You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
When creating a table using bcolz.zeros, data types in the form of (column_name, base_dtype, shape) such as below will cause a ValueError:
b = bcolz.zeros(3, [('a', 'i'), ('b', 'f', (3, ))])
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2020.1.1\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 1, in Exec
def Exec(exp, global_vars, local_vars=None):
File "<input>", line 1, in <module>
File "C:\Users\guillaume\anaconda3\envs\query-fpp\lib\site-packages\bcolz\toplevel.py", line 296, in zeros
def zeros(shape, dtype=np.float, **kwargs):
File "C:\Users\guillaume\anaconda3\envs\query-fpp\lib\site-packages\bcolz\toplevel.py", line 214, in fill
def fill(shape, dflt=None, dtype=np.float, **kwargs):
ValueError: too many values to unpack (expected 2)
I tried to specify the dimensions in the dtype string, but it also raises the same error:
b = bcolz.zeros(3, [('a', 'i'), ('b', '(3, )f' )])
FYI, here is my current workaround (potentially less fast):
b = bcolz.fromiter(
iterable=(np.zeros(1, dtype=[('a', 'i'), ('b', 'f', (3, ))])[0] for _ in range(3)),
dtype=[('a', 'i'), ('b', 'f', (3, ))],
count=3,
)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When creating a table using bcolz.zeros, data types in the form of (column_name, base_dtype, shape) such as below will cause a ValueError:
I tried to specify the dimensions in the dtype string, but it also raises the same error:
FYI, here is my current workaround (potentially less fast):
The text was updated successfully, but these errors were encountered: