Open tui-abdul opened 3 years ago
Hi, You seem to be using a special structure, probably never encountered or thought of. Channel Array block or compositions applications can be complicated. But just the traceback is not enough for me to troublehsoot. If you can send the file would be perfect or a snapshot of this composition from MDFValidator to understand this structure (Famos is not so helping) You could also scramble/anonymize the file using asammdf if you have confidentiality issues.
data = np.array(data, dtype=np.float32) use this on ur dataset
Python version
3.6.9
Platform information
Linux-5.4.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
Numpy version
1.19.5
mdfreader version
4.1
Description
import mdfreader yop = mdfreader.Mdf('x12.mf4')
x12.mf4 is a file created by IMC Famos, it is a 2-D Matrix with "Structure" property of segments.
Detailed Error
Traceback (most recent call last): File "mdf_read_test.py", line 13, in
yop = mdfreader.Mdf('x12.mf4')
File "/home/abdul/.local/lib/python3.6/site-packages/mdfreader/mdf.py", line 155, in init
metadata=metadata)
File "/home/abdul/.local/lib/python3.6/site-packages/mdfreader/mdfreader.py", line 420, in read
convert_after_read, filter_channel_names, compression, metadata)
File "/home/abdul/.local/lib/python3.6/site-packages/mdfreader/mdf4reader.py", line 1406, in read4
buf.read(channel_set, info, self.fileName)
File "/home/abdul/.local/lib/python3.6/site-packages/mdfreader/mdf4reader.py", line 374, in read
sorted_flag=True)
File "/home/abdul/.local/lib/python3.6/site-packages/mdfreader/mdf4reader.py", line 478, in load
name_list, sorted_flag, vlsd)
File "/home/abdul/.local/lib/python3.6/site-packages/mdfreader/mdf4reader.py", line 569, in read_data_list
data = recarray(record.numberOfRecords, dtype=tmp.dtype)
AttributeError: 'list' object has no attribute 'dtype'