Skip to content
Discussion options

You must be logged in to vote

To get the dtype, you can pass in the generated union type, e.g. sandbox.get_dtype(sandbox.UnsignedInteger). For arrays of unions, this will always be an "object", np.object_. BTW, this kind of array is not going to be efficient because each array element is going to be a heap-allocated Python object. If you can, you would be better off normalizing to int64 or a union of arrays of different types:

UnsignedIntegerArray: !union
  uint8: uint8[y,x]
  uint16: uint16[y,x]
  uint32: uint32[y,x]
  uint64: uint64[y,x]

Replies: 3 comments 3 replies

Comment options

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

You must be logged in to vote
1 reply
@johnstairs
Comment options

Comment options

You must be logged in to vote
2 replies
@hansenms
Comment options

@wuerflts
Comment options

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