私はnp.lib.format
に説明と照らし合わせてテストファイルの最初の10のバイトをチェックして、C++のコードでしょう
format.py
ファイルのドキュメントのヘッダからの部分的な引用
Format Version 1.0
------------------
The first 6 bytes are a magic string: exactly ``\\x93NUMPY``.
The next 1 byte is an unsigned byte: the major version number of the file
format, e.g. ``\\x01``.
The next 1 byte is an unsigned byte: the minor version number of the file
format, e.g. ``\\x00``. Note: the version of the file format is not tied
to the version of the numpy package.
The next 2 bytes form a little-endian unsigned short int: the length of
the header data HEADER_LEN.
私は別の言語でこれをコード化していませんが、同じファイルにいくつかの配列を保存したいというSOのヘッダを少し見ました。
loading arrays saved using numpy.save in append mode
私は(A)[これらの1](http://docs.scipy.org/doc/scipy/reference/ioのようないくつかの広くサポートマトリックスファイル形式を使用するのが賢明だろうと思います。 html)または(B)いくつかのカスタマイズされたコードを書いてください。 – sascha
.npyを書き込むコードはPythonであり、ヘッダーサイズを簡単に決定する必要があります。 'lib/format.py'のようなものを探します。 numpyがない場合は、githubリポジトリを参照してください。 – hpaulj