Error when writing: strided data not supported
See original GitHub issueIn python, when I try and write a simple 20x20 dataframe to disk, I keep getting an error stating that strided data isn’t yet supported. I don’t believe my data is strided (or out of the ordinary), and I can replicate the sample code given on the website without errors, but can’t seem to get it to work with my own. Here is some sample code:
import feather
import numpy as np
import pandas as pd
tempArr = reshape(np.arange(400), (20,20))
df = pd.DataFrame(tempArr)
feather.write_dataframe(df, 'test.feather')
And I get the following error output:
Traceback (most recent call last):
File "<ipython-input-10-85be0b956a3f>", line 1, in <module>
feather.write_dataframe(testDF, 'test.feather')
File "/usr/local/lib/python2.7/dist-packages/feather/api.py", line 37, in write_dataframe
writer.write_array(name, col)
File "feather/ext.pyx", line 88, in feather.ext.FeatherWriter.write_array (feather/ext.cpp:2127)
self.write_primitive(name, col, mask)
File "feather/ext.pyx", line 110, in feather.ext.FeatherWriter.write_primitive (feather/ext.cpp:2432)
self.write_ndarray(col_values, mask, &values)
File "feather/ext.pyx", line 135, in feather.ext.FeatherWriter.write_ndarray (feather/ext.cpp:2739)
check_status(pandas_to_primitive(values, out))
File "feather/ext.pyx", line 54, in feather.ext.check_status (feather/ext.cpp:1543)
raise FeatherError(frombytes(c_message))
FeatherError: Invalid: no support for strided data yet
I’m on Ubuntu 14.04, running python 2.7.6. Thanks!!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Pytorch: non-positive stride is not supported - Stack Overflow
I think the error might have to do with the dimensions of the input data, but I don't understand what "non-positive stride" means....
Read more >Typed Memoryviews — Cython 3.0.0a11 documentation
Data packing means your data may be contiguous or not contiguous in memory, and may use strides to identify the jumps in memory...
Read more >Datasets — h5py 3.7.0 documentation
Write data directly to HDF5 from a NumPy array. The source array must be C-contiguous. Selections must be the output of numpy.s_[<args>]. Broadcasting...
Read more >cuTENSOR Functions - NVIDIA Documentation Center
CUTENSOR_STATUS_NOT_SUPPORTED – if the requested descriptor is not supported (e.g., due to non-supported data type). CUTENSOR_STATUS_INVALID_VALUE – if some ...
Read more >Troubleshooting and tips — Numba 0.50.1 documentation
There can be various reasons why Numba cannot compile your code, and raises an error instead. One common reason is that your code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Striding is easier to see with distinct values - e.g.
The column values [0, 2, …] and [1, 3, …] are not contiguous in memory. You can also work around this by taking a copy
df = df.copy()
, which in effect is what your type conversions are doing.This is fixed in Feather 0.4 (which depends on pyarrow 0.4.0)