pub enum NumpyCall {
Show 20 variants
Array {
elements: Vec<TokenStream>,
},
Dot {
a: TokenStream,
b: TokenStream,
},
Sum {
arr: TokenStream,
},
Mean {
arr: TokenStream,
},
Sqrt {
arr: TokenStream,
},
Abs {
arr: TokenStream,
},
Min {
arr: TokenStream,
},
Max {
arr: TokenStream,
},
Exp {
arr: TokenStream,
},
Log {
arr: TokenStream,
},
Sin {
arr: TokenStream,
},
Cos {
arr: TokenStream,
},
Clip {
arr: TokenStream,
min: TokenStream,
max: TokenStream,
},
ArgMax {
arr: TokenStream,
},
ArgMin {
arr: TokenStream,
},
Std {
arr: TokenStream,
},
Var {
arr: TokenStream,
},
Zeros {
size: TokenStream,
},
Ones {
size: TokenStream,
},
Norm {
arr: TokenStream,
},
}Expand description
Represents a recognized numpy function call
Variants§
Array
np.array([…]) - create vector from list
Fields
§
elements: Vec<TokenStream>Dot
np.dot(a, b) - dot product
Sum
np.sum(a) - sum all elements
Fields
§
arr: TokenStreamMean
np.mean(a) - mean of all elements
Fields
§
arr: TokenStreamSqrt
np.sqrt(a) - element-wise sqrt
Fields
§
arr: TokenStreamAbs
np.abs(a) - element-wise abs
Fields
§
arr: TokenStreamMin
np.min(a) - minimum element
Fields
§
arr: TokenStreamMax
np.max(a) - maximum element
Fields
§
arr: TokenStreamExp
np.exp(a) - element-wise exp
Fields
§
arr: TokenStreamLog
np.log(a) - element-wise log
Fields
§
arr: TokenStreamSin
np.sin(a) - element-wise sin
Fields
§
arr: TokenStreamCos
np.cos(a) - element-wise cos
Fields
§
arr: TokenStreamClip
np.clip(a, min, max) - clip values
ArgMax
np.argmax(a) - index of max element
Fields
§
arr: TokenStreamArgMin
np.argmin(a) - index of min element
Fields
§
arr: TokenStreamStd
np.std(a) - standard deviation
Fields
§
arr: TokenStreamVar
np.var(a) - variance
Fields
§
arr: TokenStreamZeros
np.zeros(n) - array of zeros
Fields
§
size: TokenStreamOnes
np.ones(n) - array of ones
Fields
§
size: TokenStreamNorm
np.norm(a) or np.linalg.norm(a) - L2 norm
Fields
§
arr: TokenStreamTrait Implementations§
Auto Trait Implementations§
impl !Send for NumpyCall
impl !Sync for NumpyCall
impl Freeze for NumpyCall
impl RefUnwindSafe for NumpyCall
impl Unpin for NumpyCall
impl UnsafeUnpin for NumpyCall
impl UnwindSafe for NumpyCall
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more