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

NullPointerException when loading CSV with some blank rows #372

Open
Ruin0x11 opened this issue Sep 5, 2017 · 2 comments
Open

NullPointerException when loading CSV with some blank rows #372

Ruin0x11 opened this issue Sep 5, 2017 · 2 comments

Comments

@Ruin0x11
Copy link

Ruin0x11 commented Sep 5, 2017

I tried reading a simple CSV file with rows like this, where some of the values are null:

1981-02-23,0.3635,0.3654,0.3635,0.3635,,
1981-02-24,0.3543,0.3543,0.3506,0.3506,0.438,
1981-10-01,0.2251,0.2269,0.2251,0.2251,0.305,0.388

The data was loaded with to-dataset, but when I use to-matrix on it, this error occurs:

NullPointerException   mikera.vectorz.AVector.set (AVector.java:1454)
@mikera
Copy link
Contributor

mikera commented Sep 6, 2017

Hmmmmm I think to-matrix requires non-null numerical values in all elements of the matrix.

You'll probably need to either filter out such rows, or convert to a valid numerical value first.

@joinr
Copy link

joinr commented Feb 4, 2018

Maybe provide feedback as to where and why error occurred? Small bit of data validation before passing to function expecting non nulls rather than opaque npe (sharp edge for newbs)

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

No branches or pull requests

3 participants