Hi, it seems that lilcom fails to compress Fortran contiguous arrays and it's probably ok, as numpy preserves C contiguity in the majority operations, but some of the common operators like numpy.transpose() changes the contiguity.
To reproduce:
>>> import lilcom
>>> import numpy as np
>>> value = np.array([[0.1, 0.2], [0.3, 0.4]])
>>> lilcom.compress(value)
b'L\x00g\xc2\x0f\x13\x08\xc0\x04\x02\x10\x8dd2\x9b\x01'
>>> lilcom.compress(value.T)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/videodanchik/anaconda3/lib/python3.8/site-packages/lilcom/lilcom_interface.py", line 38, in compress
raise RuntimeError("Something went wrong in compression, return value was ",
RuntimeError: ('Something went wrong in compression, return value was ', None)
Just in case, this error I got in the following environment:
Python 3.8.3 (default, Jul 2 2020, 16:21:59)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Hi, it seems that
lilcom
fails to compress Fortran contiguous arrays and it's probably ok, asnumpy
preservesC
contiguity in the majority operations, but some of the common operators likenumpy.transpose()
changes the contiguity.To reproduce:
Just in case, this error I got in the following environment: