Build an array from numeric, textual, or binary source data.
Numeric.create.array(source, shape = 0, offset = 0)Reshapes binary, textual, or numeric sources.
- Parameters:
source: Data used to populate the arrayshape: Target dimensions or binary bufferoffset: Starting position within the source buffer
- Returns: Array holding the source values
- NumPy: Covers
np.array,np.asarray,np.asanyarray,np.asarray_chkfinite,np.ascontiguousarray,np.asfortranarray,np.require,np.astypethrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const values = Numeric.create.array([1, 2, 3])
console.log(values)
// [1,2,3]import Numeric from '@neabyte/numerix'
const values = Numeric.create.array([1, 2], 2)
console.log(values)
// [[1,2]]import Numeric from '@neabyte/numerix'
const values = Numeric.create.array(new Uint8Array([1, 2, 3]), 1)
console.log(values)
// [1,2,3]import Numeric from '@neabyte/numerix'
const values = Numeric.create.array('1 2 3')
console.log(values)
// 1 2 3