Skip to content

Precision of awkward array #3218

Answered by jpivarski
roy-brener-cern asked this question in Q&A
Discussion options

You must be logged in to vote

You can call ak.values_astype on your input data as the first step. If the input to the vector calculation is np.float64, then all of the intermediate steps will be, too. If you want to make some fields np.float64while keeping other fields as np.float32 or integers type, then you can construct a full type expression and use ak.enforce_type. The string (DataShape) representation of types is generally easier to work with, and str and ak.types.from_datashape will help you convert between strings and type objects.

(This isn't a version issue—Awkward Arrays have always supported all numerical types. Some of these functions are new or have changed names since Awkward 1—I've written all of the A…

Replies: 18 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ianna
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3212 on August 16, 2024 07:44.