Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.recarray.newbyteorder

recarray.newbyteorder(new_order='S')

Return the array with the same data viewed with a different byte order.

Equivalent to:

arr.view(arr.dtype.newbytorder(new_order))

Changes are also made in all fields and sub-arrays of the array datatype.

Parameters:

new_order : string, optional

Byte order to force; a value from the byte order specificationsbelow.new_order codes can be any of:

  • ‘S’ - swap dtype from current to opposite endian
  • {‘<’, ‘L’} - little endian
  • {‘>’, ‘B’} - big endian
  • {‘=’, ‘N’} - native order
  • {‘|’, ‘I’} - ignore (no change to byte order)

The default value (‘S’) results in swapping the currentbyte order. The code does a case-insensitive check on the firstletter ofnew_order for the alternatives above. For example,any of ‘B’ or ‘b’ or ‘biggish’ are valid to specify big-endian.

Returns:

new_arr : array

New array object with the dtype reflecting given change to thebyte order.

Previous topic

numpy.recarray.min

Next topic

numpy.recarray.nonzero

  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp