Skip to content

bh107: dtype funny business #630

Description

@jamesavery

OK, so the dtype is not defined in bh107:

In [1]: import bh107 as bh                                                                                                                                                                                         
In [2]: a = bh.array([1,2,3,4],dtype=bh.float64)                                                                                                                                                                   
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-a29eeb4706b2> in <module>
----> 1 a = bh.array([1,2,3,4],dtype=bh.float64)

AttributeError: module 'bh107' has no attribute 'float64'

Fine, then we load it from numpy:

In [3]: import numpy as np                                                                                                                                                                                         
In [4]: a = bh.array([1,2,3,4],dtype=np.float64)                                                                                                                                                                   
In [5]: a.dtype                                                                                                                                                                                                    
Out[5]: numpy.int64

But bh107 just ignores the dtype and picks int64 from looking at the data! Is dtype not a part of bh107? Is one supposed to set the type in some different way?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions