LazyArray#
This is an API interface for evaluating an expression or a Python user defined function.
You can get an object following the LazyArray API with any of the following ways:
Any expression that involves one or more NDArray objects. e.g.
a + b
, wherea
andb
are NDArray objects (see a tutorial).Using the
lazyexpr
constructor.Using the
lazyudf
constructor (see a tutorial).
The LazyArray object is a thin wrapper around the expression or user-defined function that allows for lazy evaluation. This means that the expression is not evaluated until the compute
or __getitem__
methods are called. The compute
method will return a new NDArray object with the result of the expression evaluation. The __getitem__
method will return an NumPy object instead.
See the LazyExpr and LazyUDF sections for more information.
Methods#
LazyExpr#
An expression like a + sum(b)
, where there is at least one NDArray object in operands a
and b
, returns a LazyExpr object. You can also get a LazyExpr object using the lazyexpr
constructor (see below).
This object follows the LazyArray API for evaluation and storage.
Get a LazyExpr from an expression. |
Utilities#
A series of utilities are provided to work with LazyExpr objects.
Validate expression for forbidden syntax and valid method names. |
|
Given an expression in string form, return its operands. |
LazyUDF#
For getting a LazyUDF object (which is LazyArray-compliant) from a user-defined Python function, you can use the lazyudf constructor below. See a tutorial on how this works.
This object follows the LazyArray API for evaluation, although storage is not supported yet.
Get a LazyUDF from a python user-defined function. |