Rust: HDF5文件的处理探索(to be continued.......)
2017-03-18 21:04
429 查看
对于成熟的语言而言,hdf5文件的读写等基本操作那是小菜,即便是对于julia还不足到0.6而言,也早已经是标配(好象0.2就有了吧),对于Rust而言,感觉社区还没有特别重视。
一、hdf5-rs
hdf5-rs是rust中目前最为活跃的库了,但仅管如何,真正要把这个库用起来,好象并不容易,也就是易用性并不好。
不管如何,在文档中,并没有官方的介绍,关于如何读和写hdf5的基本用法说明,毕竟,并不是谁都是rust大牛的呀。
在这个库目前为止,社区中大家提的issue中,其中就有一个大家问,哥,能否提供具体的更详细的操作文档呀。
下面附库作者在issue中提到的库的用法,谨供参考:
二、我的尝试
先开个头,我想试一试,这个包如何用。毕竟,hdf5是刚需呀。看看julia的用法(如下)或matlab的(save,load),真不知差距有多大?
一、hdf5-rs
hdf5-rs是rust中目前最为活跃的库了,但仅管如何,真正要把这个库用起来,好象并不容易,也就是易用性并不好。
不管如何,在文档中,并没有官方的介绍,关于如何读和写hdf5的基本用法说明,毕竟,并不是谁都是rust大牛的呀。
在这个库目前为止,社区中大家提的issue中,其中就有一个大家问,哥,能否提供具体的更详细的操作文档呀。
下面附库作者在issue中提到的库的用法,谨供参考:
#[macro_use] extern crate hdf5_rs; use hdf5_rs::new_datatype; use hdf5_rs::Container; use hdf5_rs::FixedString; fn main() { let f = hdf5_rs::File::open("foo.h5", "r").unwrap(); let ds = f.dataset("/test").unwrap(); h5def!( #[derive(Debug)] struct T { a: i64, b: FixedString<[u8; 3]>, c: bool, } ); let arr = ds.read::<T>().unwrap(); println!("{:?}", arr); }
二、我的尝试
先开个头,我想试一试,这个包如何用。毕竟,hdf5是刚需呀。看看julia的用法(如下)或matlab的(save,load),真不知差距有多大?
h5write(path_hdf5,"mygroup/SH600000",dat);# 把数据写入hdf5 D=h5read(path_hdf5,"mygroup/SH600000") #从hdf5出读出数据
相关文章推荐
- 使用OpenCV开发iOS图像处理应用(To be continued..)
- Rust : Pointer......to be continued
- 图像处理函数--to be continued
- Linux 101 Hacks __To be continued
- 推荐几个好用的asp.net控件(to be continued)
- Serializing - 序列化 综述 – To be continued.
- SQL 2005 Tips --事务处理The current transaction cannot be committed and cannot support operations that write to the log file
- Live Migration (SLES10 SP2 XEN) (3-问题篇)TO BE CONTINUED
- folder failed to be renamed or moved on SDK instal的处理方法
- Head First Design Parttern学习笔记(to be continued)
- 看美剧学英语,lie te me s01e01 重点单词 to be continued
- My physically based simulation book list(To be continued)
- 2004 To be continued!
- eclipse tipse....to be continued forever.
- folder failed to be renamed or moved on SDK instal的处理方法
- 算法基元(to be continued)
- 常用正则(to be continued)
- Survey over pattern string match algorithm[6 items updated && to be continued]
- 梳状滤波器(to be continued)
- flex 学习开发心得 to be continued...