NDArrayOperations extension

Extension providing mathematical and statistical operations on NDArray.

This extension adds element-wise operations, broadcasting, comparisons, and aggregations to NDArray.

Operations support:

  • Scalar operations: array + 5, array * 2
  • Array-to-array operations with broadcasting: array1 + array2
  • Aggregations along axes: sum(axis: 0), mean(axis: 1)
on

Methods

abs() NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise absolute value.
eq(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise equality comparison.
exp() NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise exponential (e^x).
gt(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise greater than comparison.
gte(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise greater than or equal comparison.
log() NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise natural logarithm.
lt(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise less than comparison.
lte(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise less than or equal comparison.
max({int? axis}) → dynamic

Available on NDArray, provided by the NDArrayOperations extension

Maximum value of all elements or along a specific axis.
mean({int? axis}) → dynamic

Available on NDArray, provided by the NDArrayOperations extension

Mean (average) of all elements or along a specific axis.
min({int? axis}) → dynamic

Available on NDArray, provided by the NDArrayOperations extension

Minimum value of all elements or along a specific axis.
pow(dynamic exponent) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise power operation.
prod() num

Available on NDArray, provided by the NDArrayOperations extension

Product of all elements.
sqrt() NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise square root.
std({int? axis}) → dynamic

Available on NDArray, provided by the NDArrayOperations extension

Standard deviation of all elements or along a specific axis.
sum({int? axis}) → dynamic

Available on NDArray, provided by the NDArrayOperations extension

Sum of all elements or along a specific axis.
variance() double

Available on NDArray, provided by the NDArrayOperations extension

Variance of all elements.

Operators

operator *(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise multiplication.
operator +(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise addition.
operator -(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise subtraction.
operator /(dynamic other) NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise division.
operator unary-() NDArray

Available on NDArray, provided by the NDArrayOperations extension

Element-wise negation.