xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

Homogenize load_csv and load_npy

Open wolfv opened this issue 7 years ago • 3 comments

Currently, load_csv takes a istream and load_npy takes a std::string for the filename. Note that the methods in xtensor-io also take a string filename.

We should homogenize the interfaces so that:

  • load_* and dump_* takes a filename
  • loads_* and dumps_* take a stream ? -- to be discussed
  • and then also document how to create a stringstream for feeding strings as input

We should take this into considerat

wolfv avatar Sep 08 '18 07:09 wolfv

I was confused by the interface, it takes some time to figure it out. It would be nice to be consistent and have documentation/examples.

xiuliren avatar Sep 10 '19 19:09 xiuliren

Thanks @jingpengw let us know if you feel like giving it a stab!

SylvainCorlay avatar Sep 10 '19 19:09 SylvainCorlay

Yes, this is quite annoying when transferring from numpy to xtensor. Is there any plan for this issue?

liurui39660 avatar Jun 30 '21 06:06 liurui39660