Reference¶
Note
Expression trees based on this package are picklable
as long as no non-picklable data
(e.g. pyopencl.array.Array
)
is referenced from DataWrapper
.
Array Interface¶
-
class
pytato.
Array
(tags=frozenset({}))[source]¶ A base class (abstract interface + supplemental functionality) for lazily evaluating array expressions. The interface seeks to maximize
numpy
compatibility, though not at all costs.Objects of this type are hashable and support structural equality comparison (and are therefore immutable).
Note
Hashability and equality testing does break
numpy
compatibility, purposefully so.FIXME: Point out our equivalent for
numpy
’s==
.-
shape
¶ A tuple of integers or scalar-shaped :class:`~pytato.array.Array`s. Array-valued shape components may be (at most affinely) symbolic in terms of :class:`~pytato.array.SizeParam`s.
Note
Affine-ness is mainly required by code generation for
IndexLambda
, butIndexLambda
is used to produce references to named arrays. Since any array that needs to be referenced in this way needs to obey this restriction anyway, a decision was made to requir the same of all array expressions.
-
dtype
¶ An instance of
numpy.dtype
.
A
tuple
ofpytools.tag.Tag
instances.Motivation: RDF triples (subject: implicitly the array being tagged, predicate: the tag, object: the arg).
Inherits from
pytools.Taggable
.
-
tagged
(tags)¶ Return a copy of self with the specified tag or tags unioned. If tags is a
pytools.tag.UniqueTag
and other tags of this type are already present, an error is raised Assumes self.copy(tags=<NEW VALUE>) is implemented.- Parameters
- Return type
T_co
an iterable with instances therein.
- Return type
~T_co
- Parameters
self (T_co) –
tags (Optional[Union[Iterable[pytools.tag.Tag], pytools.tag.Tag]]) –
Array interface:
-
T
¶
-
__mul__
()¶
-
__rmul__
()¶
-
__add__
()¶
-
__radd__
()¶
-
__sub__
()¶
-
__rsub__
()¶
-
__truediv__
()¶
-
__rtruediv__
()¶
-
__neg__
()¶
Derived attributes:
-
ndim
¶
-
-
class
pytato.
DictOfNamedArrays
(data)[source]¶ A container that maps valid Python identifiers to instances of
Array
. May occur as a result type of array computations.-
__init__
(data)[source]¶ Initialize self. See help(type(self)) for accurate signature.
- Parameters
data (Dict[str, pytato.array.Array]) –
Note
This container deliberately does not implement arithmetic.
-
NumPy-Like Interface¶
These functions generally follow the interface of the corresponding functions in
numpy
, but not all NumPy features may be supported.
-
pytato.
stack
(arrays, axis=0)[source]¶ Join a sequence of arrays along a new axis.
The axis parameter specifies the position of the new axis in the result.
Example:
>>> arrays = [pt.zeros(3)] * 4 >>> pt.stack(arrays, axis=0).shape (4, 3)
-
pytato.
concatenate
(arrays, axis=0)[source]¶ Join a sequence of arrays along an existing axis.
Example:
>>> arrays = [pt.zeros(3)] * 4 >>> pt.concatenate(arrays, axis=0).shape (12,)
-
pytato.
zeros
(shape, dtype=<class 'float'>, order='C')[source]¶ Returns an array of shape shape with all entries equal to 0.
- Return type
- Parameters
shape (Union[int, pytato.array.Array, Sequence[Union[int, pytato.array.Array]]]) –
dtype (Any) –
order (str) –
-
pytato.
ones
(shape, dtype=<class 'float'>, order='C')[source]¶ Returns an array of shape shape with all entries equal to 1.
- Return type
- Parameters
shape (Union[int, pytato.array.Array, Sequence[Union[int, pytato.array.Array]]]) –
dtype (Any) –
order (str) –
-
pytato.
full
(shape, fill_value, dtype, order='C')[source]¶ Returns an array of shape shape with all entries equal to fill_value.
- Return type
- Parameters
shape (Union[int, pytato.array.Array, Sequence[Union[int, pytato.array.Array]]]) –
fill_value (Union[numbers.Number, numpy.bool_, bool]) –
dtype (Any) –
order (str) –
-
pytato.
equal
(x1, x2)[source]¶ Returns (x1 == x2) element-wise.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
not_equal
(x1, x2)[source]¶ Returns (x1 != x2) element-wise.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
less
(x1, x2)[source]¶ Returns (x1 < x2) element-wise.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
less_equal
(x1, x2)[source]¶ Returns (x1 <= x2) element-wise.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
greater
(x1, x2)[source]¶ Returns (x1 > x2) element-wise.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
greater_equal
(x1, x2)[source]¶ Returns (x1 >= x2) element-wise.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
logical_or
(x1, x2)[source]¶ Returns the element-wise logical OR of x1 and x2.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
logical_and
(x1, x2)[source]¶ Returns the element-wise logical AND of x1 and x2.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
logical_not
(x)[source]¶ Returns the element-wise logical NOT of x.
- Return type
- Parameters
x (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
where
(condition, x=None, y=None)[source]¶ Elementwise selector between x and y depending on condition.
- Return type
- Parameters
condition (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x (Optional[Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]]) –
y (Optional[Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]]) –
-
pytato.
maximum
(x1, x2)[source]¶ Returns the elementwise maximum of x1, x2. x1, x2 being array-like objects that could be broadcasted together. NaNs are propagated.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
-
pytato.
minimum
(x1, x2)[source]¶ Returns the elementwise minimum of x1, x2. x1, x2 being array-like objects that could be broadcasted together. NaNs are propagated.
- Return type
- Parameters
x1 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
x2 (Union[pytato.array.Array, numbers.Number, numpy.bool_, bool]) –
Supporting Functionality¶
Concrete Array Data¶
-
class
pytato.array.
DataInterface
(*args, **kwargs)[source]¶ A protocol specifying the minimal interface requirements for concrete array data supported by
DataWrapper
.See
typing.Protocol
for more information about protocols.Code generation targets may impose additional restrictions on the kinds of concrete array data they support.
-
shape
¶
-
dtype
¶
-
Built-in Expression Nodes¶
-
class
pytato.array.
IndexLambda
(expr, shape, dtype, bindings=None, tags=frozenset({}))[source]¶ Represents an array that can be computed by evaluating
expr
for every value of the input indices. The input indices are represented byVariable
s with names_1
,_2
, and so on.
-
class
pytato.array.
MatrixProduct
(x1, x2, tags=frozenset({}))[source]¶ A product of two matrices, or a matrix and a vector.
The semantics of this operation follow PEP 465 [pep465], i.e., the Python matmul (@) operator.
-
x1
¶
-
x2
¶
-
-
class
pytato.array.
LoopyFunction
(data)[source]¶ Note
This should allow both a locally stored kernel and one that’s obtained by importing a dotted name.
-
class
pytato.array.
Stack
(arrays, axis, tags=frozenset({}))[source]¶ Join a sequence of arrays along an axis.
-
arrays
¶ The sequence of arrays to join
-
axis
¶ The output axis
-
-
class
pytato.array.
Concatenate
(arrays, axis, tags=frozenset({}))[source]¶ Join a sequence of arrays along an existing axis.
-
arrays
¶ An instance of
tuple
of the arrays to join. The arrays must have same shape except for the dimension corresponding to axis.
-
axis
¶ The axis along which the arrays are to be concatenated.
-
-
class
pytato.array.
AttributeLookup
(tags=frozenset({}))[source]¶ An expression node to extract an array from a
DictOfNamedArrays
.Warning
Not yet implemented.
Index Remapping¶
-
class
pytato.array.
IndexRemappingBase
(array, tags=frozenset({}))[source]¶ Base class for operations that remap the indices of an array.
Note that index remappings can also be expressed via
IndexLambda
.
-
class
pytato.array.
Roll
(array, shift, axis, tags=frozenset({}))[source]¶ Roll an array along an axis.
-
shift
¶ Shift amount.
-
axis
¶ Shift axis.
-
-
class
pytato.array.
AxisPermutation
(array, axes, tags=frozenset({}))[source]¶ Permute the axes of an array.
-
axes
¶ A permutation of the input axes.
-
Input Arguments¶
-
class
pytato.array.
InputArgumentBase
(name, tags=frozenset({}))[source]¶ Base class for input arguments.
-
name
¶ The name by which a value is supplied for the argument once computation begins. If None, a unique name will be assigned during code-generation.
Note
Creating multiple instances of any input argument with the same name in an expression is not allowed.
-
-
class
pytato.array.
DataWrapper
(name, data, shape, tags=frozenset({}))[source]¶ Takes concrete array data and packages it to be compatible with the
Array
interface.-
data
¶ A concrete array (containing data), given as, for example, a
numpy.ndarray
, or apyopencl.array.Array
. This must offershape
anddtype
attributes but is otherwise considered opaque. At evaluation time, its type must be understood by the appropriate execution backend.Starting with the construction of the
DataWrapper
, this array may not be updated in-place.
-
-
class
pytato.array.
Placeholder
(name, shape, dtype, tags=frozenset({}))[source]¶ A named placeholder for an array whose concrete value is supplied by the user during evaluation.
-
name
¶
-
__init__
(name, shape, dtype, tags=frozenset({}))[source]¶ Should not be called directly. Use
make_placeholder()
instead.
-
User-Facing Node Creation¶
Node constructors such as Placeholder.__init__
and
__init__
offer limited input validation
(in favor of faster execution). Node creation from outside
pytato
should use the following interfaces:
-
class
pytato.array.
ShapeComponent
¶
-
class
pytato.array.
ConvertibleToShape
¶
-
pytato.array.
make_dict_of_named_arrays
(data)[source]¶ Make a
DictOfNamedArrays
object.- Parameters
- Return type
-
pytato.array.
make_placeholder
(shape, dtype, name=None, tags=frozenset({}))[source]¶ Make a
Placeholder
object.
-
pytato.array.
make_size_param
(name, tags=frozenset({}))[source]¶ Make a
SizeParam
.Size parameters may be used as variables in symbolic expressions for array sizes.
-
pytato.array.
make_data_wrapper
(data, name=None, shape=None, tags=frozenset({}))[source]¶ Make a
DataWrapper
.
Aliases¶
(This section exists because Sphinx, our documentation tool, can’t (yet)
canonicalize type references. Once Sphinx 4.0 is released, we should use the
:canonical:
option here.)
-
class
pytato.array.
Array
[source]¶ Should be referenced as
pytato.Array
.
-
class
pytato.array.
DictOfNamedArrays
[source]¶ Should be referenced as
pytato.DictOfNamedArrays
.
Scalar Expressions¶
-
pytato.scalar_expr.
ScalarExpression
¶ A
type
for scalar-valued symbolic expressions. Expressions are composable and manipulable viapymbolic
.Concretely, this is an alias for
Union[Number, np.bool_, bool, pymbolic.primitives.Expression]
.
-
pytato.scalar_expr.
get_dependencies
(expression)[source]¶ Return the set of variable names in an expression.
Transforming Computations¶
-
class
pytato.transform.
DependencyMapper
[source]¶ Maps a
pytato.array.Array
to afrozenset
ofpytato.array.Array
’s it depends on.
-
class
pytato.transform.
WalkMapper
[source]¶ A mapper that walks over all the arrays in a
pytato.array.Array
.User may either override the the specific mapper methods in a derived class or override
WalkMapper.visit()
andWalkMapper.post_visit()
.
-
pytato.transform.
copy_dict_of_named_arrays
(source_dict, copy_mapper)[source]¶ Copy the elements of a
DictOfNamedArrays
into aDictOfNamedArrays
.- Parameters
source_dict (
DictOfNamedArrays
) – TheDictOfNamedArrays
to copycopy_mapper (
CopyMapper
) – A mapper that performs copies different array types
- Return type
- Returns
A new
DictOfNamedArrays
containing copies of the items in source_dict
Code Generation Targets¶
-
class
pytato.target.
Target
[source]¶ An abstract code generation target.
-
bind_program
(program, bound_arguments)[source]¶ Create a
BoundProgram
for this code generation target.
-
-
class
pytato.target.
BoundProgram
(program, bound_arguments, target)[source]¶ A container for the result of code generation along with data bindings for already-bound arguments.
-
target
¶ The code generation target.
-
program
¶ Description of the program as per
BoundProgram.target
.
-
bound_arguments
¶ A map from names to pre-bound kernel arguments.
-
__call__
()¶ It is expected that every concrete subclass of this class have a
__call__
method to run the generated code, however interfaces may vary based on the specific subclass.
-
Available targets¶
-
class
pytato.target.loopy.
LoopyTarget
[source]¶ An
loopy
target.
-
class
pytato.target.loopy.
LoopyPyOpenCLTarget
(device=None)[source]¶ A
pyopencl
code generation target.-
device
¶ The
pyopencl
device used to construct theloopy.PyOpenCLTarget
, or None.
-
-
class
pytato.target.loopy.
BoundPyOpenCLProgram
(program, bound_arguments, target)[source]¶ A wrapper around a
loopy
kernel for execution withpyopencl
.-
__call__
(queue, *args, **kwargs)[source]¶ Convenience function for launching a
pyopencl
computation.- Return type
Any
- Parameters
queue (pyopencl.CommandQueue) –
args (Any) –
kwargs (Any) –
-
Generating code¶
-
pytato.target.loopy.codegen.
generate_loopy
(result, target=None, options=None, *, cl_device=None)[source]¶ Code generation entry point.
- Parameters
result (Union[Array, DictOfNamedArrays, Dict[str, Array]]) – Outputs of the computation.
target (Optional[LoopyTarget]) – Code generation target.
options (Optional[lp.Options]) – Code generation options for the kernel.
cl_device (Optional['pyopencl.Device']) –
- Return type
- Returns
A
pytato.program.BoundProgram
wrapping the generatedloopy
program.
If result is a
dict
or aDictOfNamedArrays
and options is not supplied, then the Loopy optionreturn_dict
will be set to True.
-
class
pytato.target.loopy.codegen.
LoopyExpressionContext
(state, num_indices, _depends_on=<factory>, local_namespace=<factory>, reduction_bounds=<factory>)[source]¶ Mutable state used while generating
loopy
expressions. WrapsCodeGenState
with more expression-specific information.This data is passed through
InlinedExpressionGenMapper
via arguments, and is also used byImplementedResult.to_loopy_expression()
to retrieve contextual data.-
state
¶ The
CodeGenState
.
-
local_namespace
¶ A (read-only) local name mapping used for name lookup when generating code.
-
num_indices
¶ The number of indices of the form
_0
,_1
, allowed in the expression.
-
depends_on
¶ The set of statement IDs that need to be included in
loopy.InstructionBase.depends_on
.
-
reduction_bounds
¶ A mapping from inames to reduction bounds in the expression.
-
-
class
pytato.target.loopy.codegen.
ImplementedResult
[source]¶ Generated code for a node in the computation graph (i.e., an array expression).
-
to_loopy_expression
(indices, expr_context)[source]¶ Return a
loopy
expression for this result.- Parameters
indices (
Tuple
[Union
[int
,Expression
], …]) – symbolic expressions for the indices of the arrayexpr_context (
LoopyExpressionContext
) –the associated expression context. The fields are treated as follows:
depends_on is populated with any dependencies needed for the generated expression.
reduction_bounds is populated with reduction bounds for the reduction inames in the returned expression. If reduction_bounds is nonempty, then the returned inames are ensured to be disjoint from those present.
- Return type
Union
[Number
,bool_
,bool
,Expression
]
-
-
class
pytato.target.loopy.codegen.
StoredResult
(name, num_indices, depends_on)[source]¶ An array expression generated as a
loopy
array.See also:
pytato.array.ImplStored
.
-
class
pytato.target.loopy.codegen.
InlinedResult
(expr, num_indices, reduction_bounds, depends_on)[source]¶ An array expression generated as a
loopy
expression containing inlined sub-expressions.See also:
pytato.array.ImplInlined
.
-
class
pytato.target.loopy.codegen.
CodeGenState
(_program, results)[source]¶ A container for data kept by
CodeGenMapper
.-
_program
¶ The partial
loopy.LoopKernel
orloopy.Program
being built.
-
results
¶ A mapping from
pytato.Array
instances to instances ofImplementedResult
.
-
var_name_gen
¶
-
insn_id_gen
¶
-
update_kernel
(kernel)[source]¶ - Return type
- Parameters
kernel (loopy.kernel.LoopKernel) –
-
-
class
pytato.target.loopy.codegen.
CodeGenMapper
[source]¶ A mapper for generating code for nodes in the computation graph.
-
class
pytato.target.loopy.codegen.
InlinedExpressionGenMapper
(codegen_mapper)[source]¶ A mapper for generating
loopy
expressions with inlined sub-expressions.The inputs to this mapper are scalar expression as found in
pytato.array.IndexLambda
, or expressions that are compatible (e.g., shape expressions).The outputs of this mapper are scalar expressions suitable for wrapping in
InlinedResult
.
-
pytato.target.loopy.codegen.
domain_for_shape
(dim_names, shape, reductions)[source]¶ Create an
islpy.BasicSet
that expresses an appropriate index domain for an array of (potentially symbolic) shape shape having reduction dimensions reductions.- Parameters
dim_names (
Tuple
[str
, …]) – A tuple of strings, the names of the axes. These become set dimensions in the returned domain.shape (
Tuple
[Union
[Number
,bool_
,bool
,Expression
], …]) – A tuple of constant or quasi-affinepymbolic
expressions. The variables in these expressions become parameter dimensions in the returned set. Must have the same length as dim_names.reductions (
Dict
[str
,Tuple
[Union
[Number
,bool_
,bool
,Expression
],Union
[Number
,bool_
,bool
,Expression
]]]) – A map from reduction inames to (lower, upper) bounds (as half-open integer ranges). The variables in the bounds become parameter dimensions in the returned set.reductions –
- Return type
-
pytato.target.loopy.codegen.
get_loopy_temporary
(name, expr, cgen_mapper, state)[source]¶ - Return type
- Parameters
name (str) –
expr (pytato.array.Array) –
cgen_mapper (pytato.target.loopy.codegen.CodeGenMapper) –
state (pytato.target.loopy.codegen.CodeGenState) –
-
pytato.target.loopy.codegen.
add_store
(name, expr, result, state, cgen_mapper, output_to_temporary=False)[source]¶ Add an instruction that stores to a variable in the kernel.
- Parameters
name (
str
) – name of the output array, which is createdresult (
ImplementedResult
) – the correspondingImplementedResult
state (
CodeGenState
) – code generation stateoutput_to_temporary (
bool
) – whether to generate an output argument (default) or a temporary variablecgen_mapper (pytato.target.loopy.codegen.CodeGenMapper) –
- Return type
- Returns
the id of the generated instruction
-
pytato.target.loopy.codegen.
rename_reductions
(loopy_expr, loopy_expr_context, var_name_gen)[source]¶ Rename the reduction variables in loopy_expr and loopy_expr_context using the callable var_name_gen.
- Return type
Union
[Number
,bool_
,bool
,Expression
]- Parameters
loopy_expr (Union[numbers.Number, numpy.bool_, bool, pymbolic.primitives.Expression]) –
loopy_expr_context (pytato.target.loopy.codegen.LoopyExpressionContext) –
-
pytato.target.loopy.codegen.
normalize_outputs
(result)[source]¶ Convert outputs of a computation to the canonical form.
Performs a conversion to
DictOfNamedArrays
if necessary.
-
pytato.target.loopy.codegen.
get_initial_codegen_state
(target, options)[source]¶ - Return type
- Parameters
target (pytato.target.loopy.LoopyTarget) –
options (loopy.options.Options) –
References¶
-
class
pytato.codegen.
DictOfNamedArrays
[source]¶ Should be referenced as
pytato.DictOfNamedArrays
.
-
class
pytato.codegen.
DataInterface
[source]¶ Should be referenced as
pytato.array.DataInterface
.
Code Generation Helpers¶
-
class
pytato.codegen.
CodeGenPreprocessor
[source]¶ A mapper that preprocesses graphs to simplify code generation.
The following node simplifications are performed:
Source Node Type
Target Node Type
-
pytato.codegen.
preprocess
(outputs)[source]¶ Preprocess a computation for code generation.
- Return type
- Parameters
outputs (pytato.array.DictOfNamedArrays) –
-
pytato.codegen.
normalize_outputs
(result)[source]¶ Convert outputs of a computation to the canonical form.
Performs a conversion to
DictOfNamedArrays
if necessary.
Graph Visualization¶
-
pytato.
get_dot_graph
(result)[source]¶ Return a string in the dot language depicting the graph of the computation of result.
- Parameters
result (
Union
[Array
,DictOfNamedArrays
]) – Outputs of the computation (cf.pytato.target.loopy.codegen.generate_loopy()
).result –
- Return type
-
pytato.
show_dot_graph
(result)[source]¶ Show a graph representing the computation of result in a browser.
- Parameters
result (
Union
[Array
,DictOfNamedArrays
]) – Outputs of the computation (cf.pytato.target.loopy.codegen.generate_loopy()
).result –
- Return type
Helper routines¶
-
pytato.utils.
are_shape_components_equal
(dim1, dim2)[source]¶ Returns True iff dim1 and dim2 are have equal
SizeParam
coefficients in their expressions.- Return type
- Parameters
dim1 (Union[int, pytato.array.Array]) –
dim2 (Union[int, pytato.array.Array]) –
-
pytato.utils.
are_shapes_equal
(shape1, shape2)[source]¶ Returns True iff shape1 and shape2 have the same dimensionality and the correpsonding components are equal as defined by
are_shape_components_equal()
.- Return type
- Parameters
shape1 (Tuple[Union[int, pytato.array.Array], ..]) –
shape2 (Tuple[Union[int, pytato.array.Array], ..]) –
-
pytato.utils.
get_shape_after_broadcasting
(exprs)[source]¶ Returns the shape after broadcasting exprs in an operation.
- Return type
- Parameters
exprs (List[Union[pytato.array.Array, numbers.Number, numpy.bool_, bool, pymbolic.primitives.Expression]]) –
-
pytato.utils.
dim_to_index_lambda_components
(expr, vng)[source]¶ Returns the scalar expressions and bindings to use the shape component within an index lambda.
>>> n = pt.make_size_param("n") >>> expr, bnds = dim_to_index_lambda_components(3*n+8, UniqueNameGenerator()) >>> print(expr) 3*_in + 8 >>> bnds {'_in': <pytato.array.SizeParam ...>}
- Return type
Tuple
[Union
[Number
,bool_
,bool
,Expression
],Dict
[str
,SizeParam
]]- Parameters
expr (Union[int, pytato.array.Array]) –
vng (pytools.UniqueNameGenerator) –
Pytato-specific exceptions¶
-
class
pytato.diagnostic.
NameClashError
[source]¶ Raised when 2 non-identical
InputArgumentBase
’s are reachable in anArray
’s DAG and share the same name. Here, we refer to 2 objectsa
andb
as being identical iffa is b
.