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
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/johnmuschelli/miniconda3/lib/python3.11/site-packages/pygt3x/reader.py", line 56, in __enter__
self._get_data(self.num_rows)
File "/Users/johnmuschelli/miniconda3/lib/python3.11/site-packages/pygt3x/reader.py", line 275, in _get_data
acceleration, temperature = self._get_data_nhanes()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johnmuschelli/miniconda3/lib/python3.11/site-packages/pygt3x/reader.py", line 113, in _get_data_nhanes
payload = read_nhanes_payload(
^^^^^^^^^^^^^^^^^^^^
File "/Users/johnmuschelli/miniconda3/lib/python3.11/site-packages/pygt3x/activity_payload.py", line 77, in read_nhanes_payload
unpack_bitpack_acceleration(payload_bytes) / NHANES_SCALE, 3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johnmuschelli/miniconda3/lib/python3.11/site-packages/pygt3x/activity_payload.py", line 25, in unpack_bitpack_acceleration
np.reshape(data, (data.shape[0] // 3, 3)).astype(np.uint16).T
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johnmuschelli/miniconda3/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 285, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johnmuschelli/miniconda3/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 59, in _wrapfunc
return bound(*args, **kwds)
^^^^^^^^^^^^^^^^^^^^
ValueError: cannot reshape array of size 81647788 into shape (27215929,3)
Cannot read in file for reshaping.
Gzipped version of file is located here:
AI1_NEO1B41100255_2016-10-17.gt3x.gz
Replication in R
The agcounts package in R (https://github.com/bhelsel/agcounts), which calls this
pygt3x
package through reticulate shows the same issue:https://github.com/bhelsel/agcounts/blob/f1cce521fef3ac9eeb6c8ed6b6cc05bd8d253dc6/R/agread.R#L57
The
read.gt3x
package can read it in, which is calledhttps://github.com/bhelsel/agcounts/blob/f1cce521fef3ac9eeb6c8ed6b6cc05bd8d253dc6/R/agread.R#L80
Created on 2023-12-29 with reprex v2.0.2
Session info
The text was updated successfully, but these errors were encountered: