-
Notifications
You must be signed in to change notification settings - Fork 26
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
Infer dtype from data when spec dtype is none or numeric #143
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #143 +/- ##
======================================
+ Coverage 69% 69.2% +0.2%
======================================
Files 24 24
Lines 4971 4981 +10
Branches 1139 1143 +4
======================================
+ Hits 3430 3447 +17
+ Misses 1172 1168 -4
+ Partials 369 366 -3
Continue to review full report at Codecov.
|
I still need to add tests, but just wanted to put the proposed solution out there. |
I tested on my code and this PR solved the problem, related to #140 , thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Fixes #140 and fixes #142.
If an AbstractDataChunkIterator is used for a dataset that has the dtype 'numeric' or no dtype in the spec, then the dtype used to write the dataset will be inferred from the
dtype
of the AbstractDataChunkIterator. Same for all numpy types, lists and tuples, and Python primitives. Previously, the dtype used to write the dataset was set to None, and so I believe h5py used a default dtype of float32.