Add method to numpy::dtype to set byteorder
オープン
- 主要言語
- C++
- スター
- 537
- フォーク
- 223
- 平均マージ
- 11時間 22分
- マージ済み PR(30日)
- 2
説明
I've taken a look at `numpy/dtype.hpp`, and there does not appear to be any way to set the byte order of the array being constructed. The workaround I am currently using (which requires adding the numpy C API to my build and including the headers in my source) is the following:
```
np::dtype scalarDtype = np::dtype::get_builtin();
reinterpret_cast(scalarDtype.ptr())->byteorder = '>';
```
So it should be as simple as adding a method to dtype to allow the user to set the byteorder on the underlying numpy struct.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。