Numpy.string — NumPy V1.10 Manual
- Scipy.org
- Docs
- NumPy v1.10 Manual
- NumPy Reference
- Array objects
- The N-dimensional array (ndarray)
- index
- next
- previous
Construct Python bytes containing the raw data bytes in the array.
Constructs Python bytes showing a copy of the raw contents of data memory. The bytes object can be produced in either ‘C’ or ‘Fortran’, or ‘Any’ order (the default is ‘C’-order). ‘Any’ order means C-order unless the F_CONTIGUOUS flag in the array is set, in which case it means ‘Fortran’ order.
This function is a compatibility alias for tobytes. Despite its name it returns bytes not strings.
| Parameters: | order : {‘C’, ‘F’, None}, optional
|
|---|---|
| Returns: | s : bytes
|
Examples
>>> x = np.array([[0, 1], [2, 3]]) >>> x.tobytes() b'\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00' >>> x.tobytes('C') == x.tobytes() True >>> x.tobytes('F') b'\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00'Previous topic
numpy.ndarray.itemset
Next topic
numpy.ndarray.tobytes
- © Copyright 2008-2009, The Scipy community.
- Last updated on Oct 18, 2015.
- Created using Sphinx 1.2.1.
Từ khóa » B' X00'
-
Python Converting Hexadecimal Binary To String - Stack Overflow
-
Python Concepts/Bytes Objects And Bytearrays - Wikiversity
-
Python: Bytes() Function - W3resource
-
[PDF] Binary Data In Python3
-
How Can I Use One Drive File Content Into My Code Without Saving Into ...
-
Python Decode B' X00' Code Example
-
Python Code Snippet - ReqBin
-
Int To Bytes Conversion Confusion - Users - Discussions On
-
Python Bytes() Method - GeeksforGeeks
-
BF.SCANDUMP - Redis
-
[PDF] Chapter - 6 : Functions
-
[PDF] Python Built-In Functions