dask 2021.10.0

NotesParametersReturnsBackRef
empty(shape, dtype=float, order='C', *, like=None)

Notes

empty , unlike zeros , does not set the array values to zero, and may therefore be marginally faster. On the other hand, it requires the user to manually set all the values in the array, and should be used with caution.

Parameters

shape : int or tuple of int

Shape of the empty array, e.g., (2, 3) or 2 .

dtype : data-type, optional

Desired output data-type for the array, e.g, numpy.int8 . Default is numpy.float64 .

order : {'C', 'F'}, optional, default: 'C'

Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.

like : array_like

Reference object to allow the creation of arrays which are not NumPy arrays. If an array-like passed in as like supports the __array_function__ protocol, the result will be defined by it. In this case, it ensures the creation of an array object compatible with that passed in via this argument.

versionadded

Returns

out : ndarray

Array of uninitialized (arbitrary) data of the given shape, dtype, and order. Object arrays will be initialized to None.

Return a new array of given shape and type, without initializing entries.

See Also

empty_like

Return an empty array with shape and type of input.

full

Return a new array of given shape filled with value.

ones

Return a new array setting values to one.

zeros

Return a new array setting values to zero.

Examples

This example is valid syntax, but we were not able to check execution
>>> np.empty([2, 2])
array([[ -9.74499359e+001,   6.69583040e-309],
       [  2.13182611e-314,   3.06959433e-309]])         #uninitialized
This example is valid syntax, but we were not able to check execution
>>> np.empty([2, 2], dtype=int)
array([[-1073741821, -1067949133],
       [  496041986,    19249760]])                     #uninitialized
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.array.creation.full_like dask.array.routines.array dask.array.wrap.full_like dask.array.creation.ones_like dask.array.creation.empty_like dask.utils.empty dask.array.creation.zeros_like

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/utils.py#None
type: <class 'dask.utils.Dispatch'>
Commit: