-
Notifications
You must be signed in to change notification settings - Fork 89
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
C++ refactoring: ak.type and ak.values_astype #1234
Conversation
Codecov Report
|
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.
On the whole, it's looking good, but I have a few requests. Most of them are about using centralized utilities, reducing the proliferation of type-lists that were in v1.
The type name for leaves of the type tree changed from PrimitiveType to NumpyType. As far as I can see, there is no ak._v2.types.PrimitiveType
, so how are these tests working? Virtually every attempt to build a type would have to terminate on these leaf-nodes, so you ought to be getting
AttributeError: module 'awkward._v2.types' has no attribute 'PrimitiveType'
(I don't see a PrimitiveType being defined in this diff.)
Anyway, in an attempt to use terminology more consistently, the NumpyArray has NumpyForm and NumpyType. We still use the word "primitive," but it refers to the string naming the type in Forms. v1 and v2 have to be able to accept each others' Forms so that pickled data from each version can be used in the other (that was a goal, so that users could build work-arounds if they need to), and that means the JSON field name "primitive" in the Form can't be changed. (Otherwise, a better name might be "dtype", though that would also be misleading because dtypes are Python objects, and this is a string. So it's just going to be "primitive".)
Co-authored-by: Jim Pivarski <[email protected]>
Co-authored-by: Jim Pivarski <[email protected]>
Co-authored-by: Jim Pivarski <[email protected]>
for more information, see https://pre-commit.ci
…hep/awkward-1.0 into ioanaif/ak.values_astype
for more information, see https://pre-commit.ci
…hep/awkward-1.0 into ioanaif/ak.values_astype
for more information, see https://pre-commit.ci
No description provided.