larray.empty_like

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

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

Parameters:

array : LArray

Input array.

title : str, optional

Title.

dtype : data-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.

Returns:

LArray

Examples

>>> a = ndrange((3, 2))
>>> empty_like(a)   
-\-                   0                   1
  0  2.12199579097e-314  6.36598737388e-314
  1  1.06099789568e-313  1.48539705397e-313
  2  1.90979621226e-313  2.33419537056e-313