Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a warning to the discretemeasure function #105

Conversation

davibarreira
Copy link
Member

I noted that there is an "inconsistency" with our discretemeasure function. If I pass musupp = [[0],[1],[2]], the function is dispatched to the multivariate case, instead of passing to the DiscreteNonParametric. I can see why that is, since the type required would be a vector, and not a vector of vectors.

I've been trying to fix this issue, but all solutions I came up with require that we check the length of the vector inside the vectors of vectors. And I'm guessing this would cause instabilities to the compiler (this is a supposition based on past code I wrote that @devmotion required changes).

So instead, I decided to add a warning inside the discretemeasure function, so that the user is informed that he should not pass a vector of 1D vectors, and should instead flatten into a single vector in case his support is 1D.

@coveralls
Copy link

coveralls commented Jun 17, 2021

Pull Request Test Coverage Report for Build 968745529

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 94.49%

Files with Coverage Reduction New Missed Lines %
src/utils.jl 1 96.97%
Totals Coverage Status
Change from base Build 960502669: -0.2%
Covered Lines: 463
Relevant Lines: 490

💛 - Coveralls

@davibarreira
Copy link
Member Author

This PR is very simple, I guess it can be merged before #92 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants