larray.empty_like

larray.empty_like(array, title=None, dtype=None, order='K', meta=None) Array[source]

Return an array with the same axes as array and uninitialized (arbitrary) data.

Parameters
arrayArray

Input array.

titlestr, optional

Deprecated. See ‘meta’ below.

dtypedata-type, optional

Overrides the data type of the result. Defaults to the data type of array.

order{‘C’, ‘F’, ‘A’, or ‘K’}, optional

Overrides the memory layout of the result. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ (default) means match the layout of a as closely as possible.

metalist of pairs or dict or Metadata, optional

Metadata (title, description, author, creation_date, …) associated with the array. Keys must be strings. Values must be of type string, int, float, date, time or datetime.

Returns
Array

Examples

>>> a = ndtest((3, 2))
>>> empty_like(a)   
a\b                  b0                  b1
 a0  2.12199579097e-314  6.36598737388e-314
 a1  1.06099789568e-313  1.48539705397e-313
 a2  1.90979621226e-313  2.33419537056e-313