帮酷LOGO

Experimental code to read/write NumPy .NPY files in MATLAB

在MATLAB中,用于读取/写入 NumPy. NPY 文件的实验代码

将光标移到/点击文章中的句子上,可以查看译文。 显示原文      显示译文      双语对照

  • 显示内容
Experimental code to read/write NumPy .NPY files in MATLAB



  • Source Code:npy-matlab
  • WebSite:http://www.github.com/kwikteam/npy-matlab
  • npy-matlab Documents
  • npy-matlab Download
  • npy-matlab

    Experimental code to read/write NumPy. NPY files in MATLAB

    Usage example :

    >> a = rand(5,4,3);
    >> writeNPY(a, 'a.npy');
    >> b = readNPY('a.npy');
    >> sum(a(:)==b(:))
    ans =
     60

    Tests

    see the notebook for python tests

    See test_readNPY.m for matlab reading/writing tests.

    Note re : memory mapping npy files

    See exampleMemmap.m for example of how to memory map a npy file in matlab, which is not trivial when the file uses C-ordering (i.e.row-major order) rather than fortran-ordering (i.e.column-major ordering). Matlab's memory mapping only supports fortran, but Python's default is C so npy files created with Python defaults are not straightforward to read in Matlab.




    Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备05059198号-3  |  如果智培  |  酷兔英语