llohse / libnpy

C++ library for reading and writing of numpy's .npy files
MIT License
373 stars 71 forks source link

a .npy files support for std::valarray #18

Closed crj-mc closed 2 years ago

crj-mc commented 2 years ago

I think std::valarray is a better API for Numerical calculations.

llohse commented 2 years ago

Thank your for your interest in improving libnpy. As far as I can tell, your commit contains several valuable improvements besides its main change, supporting std::valarray. While I would like to merge at least some of the changes, I think the amount of changes is a little too much for a single PR, let alone a single commit.

I have to say that I am hesitant about supporting std::valarray in libnpy. You can easily convert between valarray and vector, although it involves a copy. When #20 is merged, you can also write the contents of valarray without a copy. If you could provide a set of minimal changes to support std::valarray I might be convinced otherwise.

llohse commented 2 years ago

closing for lack of activity