Skip to content
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

AttributeError: module 'numpy' has no attribute 'float128' in data_container.py #17

Open
jasonlines opened this issue Dec 14, 2018 · 0 comments

Comments

@jasonlines
Copy link
Collaborator

When calling a.to_pandas_dataframe() where a is an XDataFrame, the following exception is thrown:

AttributeError: module 'numpy' has no attribute 'float128'

Specifically, it occurs in \xpandas\data_container\data_container.py:

~\Anaconda3\envs\sktime\lib\site-packages\xpandas\data_container\data_container.py in to_pandas_dataframe(self)
    251         is_all_columns_are_primitive = all(
    252             _is_class_a_primitive(dt)
--> 253             for dt in data_types
    254         )
    255         if is_all_columns_are_primitive:

~\Anaconda3\envs\sktime\lib\site-packages\xpandas\data_container\data_container.py in <genexpr>(.0)
    251         is_all_columns_are_primitive = all(
    252             _is_class_a_primitive(dt)
--> 253             for dt in data_types
    254         )
    255         if is_all_columns_are_primitive:

~\Anaconda3\envs\sktime\lib\site-packages\xpandas\data_container\data_container.py in _is_class_a_primitive(cls)
     30     '''
     31     primitives = [
---> 32         np.float16, np.float32, np.float64, np.float128,
     33         np.int8, np.int16, np.int32, np.int64,
     34         bool, str, np.uint8, np.uint16, np.uint32, np.uint64,

AttributeError: module 'numpy' has no attribute 'float128' 

I believe this is because float128 is platform-dependent. e.g. stack overflow suggests:

float128 exists on some platforms but not others, and on those platforms where it does exist it's almost certainly simply the 80-bit x87 extended precision type, padded to 128 bits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant