Open charlestondance opened 7 years ago
ok i can turn it into a string this way
string_of_charset = "" for x, i in enumerate(charset): string_of_charset+=str(i[0])
But I get the error
Traceback (most recent call last): File "preprocess.py", line 93, in
main() File "preprocess.py", line 80, in main apply_fn=lambda ch: np.array(map(one_hot_encoded_fn, File "preprocess.py", line 75, in create_chunk_dataset new_data[chunk_ixs, ...] = apply_fn(chunk) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (C:\Minonda\conda-bld\h5py_1490028995708\work\h5 py_objects.c:2867) File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (C:\Minonda\conda-bld\h5py_1490028995708\work\h5 py_objects.c:2825) File "C:\Users\dmcclymo\AppData\Local\Continuum\Anaconda3\lib\site-packages\h5py_hl\dataset.py", line 629, in setit em for fspace in selection.broadcast(mshape): File "C:\Users\dmcclymo\AppData\Local\Continuum\Anaconda3\lib\site-packages\h5py_hl\selections.py", line 403, in broa dcast raise TypeError("Broadcasting is not supported for complex selections") TypeError: Broadcasting is not supported for complex selections
I ran into the same problem. The problem went away when I went to Python2.7 by creating a Python 2.7 environment to run the code in. I did this using
conda create -n Python27 python=2.7
If you want to run in Python 3, this post might be helpful: one of the responders suggests using np.string_()
instead of str
.
In Python 3.6 I tried: _charset = np.string__(charset)
It did away: TypeError: No conversion path for dtype: dtype('<U1')
However, it raised: TypeError: Broadcasting is not supported for complex selections
I have same error .... TypeError: Broadcasting is not supported for complex selections. Someone solved?
Hi,
I am trying to run preprocess.py and there is an unresolved reference to reduce:
charset = list(reduce(lambda x, y: set(y) | x, structures, set()))
however, if I:
from functools import reduce
I then get the error.