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

[BUG-REPORT] Vaex to_dask_array fails AttributeError: 'ValueError' object has no attribute 'numpy' #1970

Open
Ben-Epstein opened this issue Mar 12, 2022 · 4 comments

Comments

@Ben-Epstein
Copy link
Contributor

Thank you for reaching out and helping us improve Vaex!

Before you submit a new Issue, please read through the documentation. Also, make sure you search through the Open and Closed Issues - your problem may already be discussed or addressed.

Description
Please provide a clear and concise description of the problem. This should contain all the steps needed to reproduce the problem. A minimal code example that exposes the problem is very appreciated.

Software information

  • Vaex version (import vaex; vaex.__version__): {'vaex-core': '4.8.0', 'vaex-hdf5': '0.11.1'}
  • Vaex was installed via: pip / conda-forge / from source pip
  • OS: MacOS

Additional information
Please state any supplementary information or provide additional context for the problem (e.g. screenshots, data, etc..).

import vaex

def tolist(x,y):
    return list([x,y])

data = {'A':[1,2,1],'B':['a','b','c'], 'C':['d', 'e', 'f']}
df = vaex.from_dict(data)
df.to_dask_array()
@Ben-Epstein
Copy link
Contributor Author

Seems like it's any non numeric columns that cause the issue

from random import randint 

df = vaex.from_arrays(
    id=[1,1,4,2,5,64,46,64,4,2,5],
    letter = ["a" for _ in range(11)]
)

df[["id"]].to_dask_array()  # works
df[["id","letter"]].to_dask_array()  # error above

@JovanVeljanoski
Copy link
Member

True, exporting non numeric data to a dask array is not supported (for now).

@maartenbreddels
Copy link
Member

Yeah, we could improve on the error though. Not sure if we can have a meaningful dask-arrow-array export btw.

@maartenbreddels
Copy link
Member

I think this is a good first issue to improve the error message.

Shashank1202 added a commit to Shashank1202/vaex that referenced this issue Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants