ratal / mdfr

ASAM mdf reader in rust
GNU General Public License v3.0
9 stars 1 forks source link

Add `get_channel_dtype` and `get_channel_shape` methods #14

Closed Illviljan closed 7 months ago

Illviljan commented 7 months ago

I would like to see the methods get_channel_dtype and get_channel_shape added to the api to avoid loading all the data to memory.

To be clear, they would correspond to:

import numpy as np

arr = np.array([3,6,8], dtype=float)
arr.shape
Out[33]: (3,)
arr.dtype
Out[34]: dtype('float64')

This allows you to reason about the arrays without loading the data with for example dask.

ratal commented 7 months ago

You can have a look at arrow-rs-instead-of-arrow2 branch, it contains a new method .get_channel_dtype(), returning a struct with fields kind and shape

ratal commented 7 months ago

latest release should fix this issue

Illviljan commented 7 months ago

Cool, thanks!