Free Operations
Zero-cost operations (0 FLOPs) for tensor creation, reshaping, indexing,
and data movement. These never consume budget.
Includes: array, zeros, ones, eye, arange, linspace,
reshape, transpose, concatenate, stack, split,
where, copy, astype, and 140+ more.
API Reference
mechestim._free_ops
Zero-FLOP wrappers around NumPy tensor creation and manipulation.
Every function in this module delegates directly to the corresponding
NumPy function and costs 0 FLOPs , so they work both inside and
outside a :class:~mechestim._budget.BudgetContext.
append ( * args , ** kwargs )
Append values. Wraps numpy.append. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def append ( * args , ** kwargs ):
"""Append values. Wraps ``numpy.append``. Cost: 0 FLOPs."""
return _np . append ( * args , ** kwargs )
arange ( * args , ** kwargs )
Return evenly spaced values. Wraps numpy.arange. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def arange ( * args , ** kwargs ):
"""Return evenly spaced values. Wraps ``numpy.arange``. Cost: 0 FLOPs."""
return _np . arange ( * args , ** kwargs )
argwhere ( * args , ** kwargs )
Find indices of non-zero elements. Wraps numpy.argwhere. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def argwhere ( * args , ** kwargs ):
"""Find indices of non-zero elements. Wraps ``numpy.argwhere``. Cost: 0 FLOPs."""
return _np . argwhere ( * args , ** kwargs )
array ( object , dtype = None , ** kwargs )
Create an array. Wraps numpy.array. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def array ( object , dtype = None , ** kwargs ):
"""Create an array. Wraps ``numpy.array``. Cost: 0 FLOPs."""
return _np . array ( object , dtype = dtype , ** kwargs )
array_split ( * args , ** kwargs )
Split array into sub-arrays. Wraps numpy.array_split. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def array_split ( * args , ** kwargs ):
"""Split array into sub-arrays. Wraps ``numpy.array_split``. Cost: 0 FLOPs."""
return _np . array_split ( * args , ** kwargs )
asarray ( a , dtype = None , ** kwargs )
Convert to array. Wraps numpy.asarray. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def asarray ( a , dtype = None , ** kwargs ):
"""Convert to array. Wraps ``numpy.asarray``. Cost: 0 FLOPs."""
return _np . asarray ( a , dtype = dtype , ** kwargs )
asarray_chkfinite ( * args , ** kwargs )
Convert to array checking for NaN/Inf. Wraps numpy.asarray_chkfinite. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def asarray_chkfinite ( * args , ** kwargs ):
"""Convert to array checking for NaN/Inf. Wraps ``numpy.asarray_chkfinite``. Cost: 0 FLOPs."""
return _np . asarray_chkfinite ( * args , ** kwargs )
astype ( x , dtype )
Cast array to dtype . Wraps x.astype(dtype). Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def astype ( x , dtype ):
"""Cast array to *dtype*. Wraps ``x.astype(dtype)``. Cost: 0 FLOPs."""
return x . astype ( dtype )
atleast_1d ( * args , ** kwargs )
Convert to 1-D or higher. Wraps numpy.atleast_1d. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def atleast_1d ( * args , ** kwargs ):
"""Convert to 1-D or higher. Wraps ``numpy.atleast_1d``. Cost: 0 FLOPs."""
return _np . atleast_1d ( * args , ** kwargs )
atleast_2d ( * args , ** kwargs )
Convert to 2-D or higher. Wraps numpy.atleast_2d. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def atleast_2d ( * args , ** kwargs ):
"""Convert to 2-D or higher. Wraps ``numpy.atleast_2d``. Cost: 0 FLOPs."""
return _np . atleast_2d ( * args , ** kwargs )
atleast_3d ( * args , ** kwargs )
Convert to 3-D or higher. Wraps numpy.atleast_3d. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def atleast_3d ( * args , ** kwargs ):
"""Convert to 3-D or higher. Wraps ``numpy.atleast_3d``. Cost: 0 FLOPs."""
return _np . atleast_3d ( * args , ** kwargs )
base_repr ( * args , ** kwargs )
Return string representation of number. Wraps numpy.base_repr. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def base_repr ( * args , ** kwargs ):
"""Return string representation of number. Wraps ``numpy.base_repr``. Cost: 0 FLOPs."""
return _np . base_repr ( * args , ** kwargs )
binary_repr ( * args , ** kwargs )
Return binary representation of integer. Wraps numpy.binary_repr. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def binary_repr ( * args , ** kwargs ):
"""Return binary representation of integer. Wraps ``numpy.binary_repr``. Cost: 0 FLOPs."""
return _np . binary_repr ( * args , ** kwargs )
block ( * args , ** kwargs )
Assemble array from nested lists. Wraps numpy.block. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def block ( * args , ** kwargs ):
"""Assemble array from nested lists. Wraps ``numpy.block``. Cost: 0 FLOPs."""
return _np . block ( * args , ** kwargs )
bmat ( * args , ** kwargs )
Build matrix from string/nested sequence. Wraps numpy.bmat. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def bmat ( * args , ** kwargs ):
"""Build matrix from string/nested sequence. Wraps ``numpy.bmat``. Cost: 0 FLOPs."""
return _np . bmat ( * args , ** kwargs )
broadcast_arrays ( * args , ** kwargs )
Broadcast any number of arrays. Wraps numpy.broadcast_arrays. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def broadcast_arrays ( * args , ** kwargs ):
"""Broadcast any number of arrays. Wraps ``numpy.broadcast_arrays``. Cost: 0 FLOPs."""
return _np . broadcast_arrays ( * args , ** kwargs )
broadcast_shapes ( * args , ** kwargs )
Broadcast shapes to a common shape. Wraps numpy.broadcast_shapes. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def broadcast_shapes ( * args , ** kwargs ):
"""Broadcast shapes to a common shape. Wraps ``numpy.broadcast_shapes``. Cost: 0 FLOPs."""
return _np . broadcast_shapes ( * args , ** kwargs )
broadcast_to ( array , shape )
Broadcast array to shape. Wraps numpy.broadcast_to. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def broadcast_to ( array , shape ):
"""Broadcast array to shape. Wraps ``numpy.broadcast_to``. Cost: 0 FLOPs."""
return _np . broadcast_to ( array , shape )
can_cast ( * args , ** kwargs )
Returns True if cast between data types can occur. Wraps numpy.can_cast. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def can_cast ( * args , ** kwargs ):
"""Returns True if cast between data types can occur. Wraps ``numpy.can_cast``. Cost: 0 FLOPs."""
return _np . can_cast ( * args , ** kwargs )
choose ( * args , ** kwargs )
Construct array from index array. Wraps numpy.choose. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def choose ( * args , ** kwargs ):
"""Construct array from index array. Wraps ``numpy.choose``. Cost: 0 FLOPs."""
return _np . choose ( * args , ** kwargs )
column_stack ( * args , ** kwargs )
Stack 1-D arrays as columns. Wraps numpy.column_stack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def column_stack ( * args , ** kwargs ):
"""Stack 1-D arrays as columns. Wraps ``numpy.column_stack``. Cost: 0 FLOPs."""
return _np . column_stack ( * args , ** kwargs )
common_type ( * args , ** kwargs )
Return scalar type common to input arrays. Wraps numpy.common_type. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def common_type ( * args , ** kwargs ):
"""Return scalar type common to input arrays. Wraps ``numpy.common_type``. Cost: 0 FLOPs."""
return _np . common_type ( * args , ** kwargs )
compress ( * args , ** kwargs )
Return selected slices along an axis. Wraps numpy.compress. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def compress ( * args , ** kwargs ):
"""Return selected slices along an axis. Wraps ``numpy.compress``. Cost: 0 FLOPs."""
return _np . compress ( * args , ** kwargs )
concat ( * args , ** kwargs )
Join arrays along an axis. Wraps numpy.concat. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def concat ( * args , ** kwargs ):
"""Join arrays along an axis. Wraps ``numpy.concat``. Cost: 0 FLOPs."""
return _np . concat ( * args , ** kwargs )
concatenate ( arrays , axis = 0 , ** kwargs )
Join arrays along an axis. Wraps numpy.concatenate. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def concatenate ( arrays , axis = 0 , ** kwargs ):
"""Join arrays along an axis. Wraps ``numpy.concatenate``. Cost: 0 FLOPs."""
return _np . concatenate ( arrays , axis = axis , ** kwargs )
copy ( a , ** kwargs )
Return copy of array. Wraps numpy.copy. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def copy ( a , ** kwargs ):
"""Return copy of array. Wraps ``numpy.copy``. Cost: 0 FLOPs."""
return _np . copy ( a , ** kwargs )
copyto ( * args , ** kwargs )
Copies values from one array to another. Wraps numpy.copyto. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def copyto ( * args , ** kwargs ):
"""Copies values from one array to another. Wraps ``numpy.copyto``. Cost: 0 FLOPs."""
return _np . copyto ( * args , ** kwargs )
delete ( * args , ** kwargs )
Return new array with sub-arrays deleted. Wraps numpy.delete. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def delete ( * args , ** kwargs ):
"""Return new array with sub-arrays deleted. Wraps ``numpy.delete``. Cost: 0 FLOPs."""
return _np . delete ( * args , ** kwargs )
diag ( v , k = 0 )
Extract diagonal or construct diagonal array. Wraps numpy.diag. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def diag ( v , k = 0 ):
"""Extract diagonal or construct diagonal array. Wraps ``numpy.diag``. Cost: 0 FLOPs."""
return _np . diag ( v , k = k )
diag_indices ( * args , ** kwargs )
Return indices to access main diagonal. Wraps numpy.diag_indices. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def diag_indices ( * args , ** kwargs ):
"""Return indices to access main diagonal. Wraps ``numpy.diag_indices``. Cost: 0 FLOPs."""
return _np . diag_indices ( * args , ** kwargs )
diag_indices_from ( * args , ** kwargs )
Return indices to access main diagonal of array. Wraps numpy.diag_indices_from. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def diag_indices_from ( * args , ** kwargs ):
"""Return indices to access main diagonal of array. Wraps ``numpy.diag_indices_from``. Cost: 0 FLOPs."""
return _np . diag_indices_from ( * args , ** kwargs )
diagflat ( * args , ** kwargs )
Create diagonal array from flattened input. Wraps numpy.diagflat. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def diagflat ( * args , ** kwargs ):
"""Create diagonal array from flattened input. Wraps ``numpy.diagflat``. Cost: 0 FLOPs."""
return _np . diagflat ( * args , ** kwargs )
diagonal ( a , offset = 0 , axis1 = 0 , axis2 = 1 )
Return diagonal. Wraps numpy.diagonal. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def diagonal ( a , offset = 0 , axis1 = 0 , axis2 = 1 ):
"""Return diagonal. Wraps ``numpy.diagonal``. Cost: 0 FLOPs."""
return _np . diagonal ( a , offset = offset , axis1 = axis1 , axis2 = axis2 )
dsplit ( * args , ** kwargs )
Split array along third axis. Wraps numpy.dsplit. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def dsplit ( * args , ** kwargs ):
"""Split array along third axis. Wraps ``numpy.dsplit``. Cost: 0 FLOPs."""
return _np . dsplit ( * args , ** kwargs )
dstack ( * args , ** kwargs )
Stack arrays along third axis. Wraps numpy.dstack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def dstack ( * args , ** kwargs ):
"""Stack arrays along third axis. Wraps ``numpy.dstack``. Cost: 0 FLOPs."""
return _np . dstack ( * args , ** kwargs )
empty ( shape , dtype = float , ** kwargs )
Return uninitialized array. Wraps numpy.empty. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def empty ( shape , dtype = float , ** kwargs ):
"""Return uninitialized array. Wraps ``numpy.empty``. Cost: 0 FLOPs."""
return _np . empty ( shape , dtype = dtype , ** kwargs )
empty_like ( a , dtype = None , ** kwargs )
Return uninitialized array with same shape. Wraps numpy.empty_like. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def empty_like ( a , dtype = None , ** kwargs ):
"""Return uninitialized array with same shape. Wraps ``numpy.empty_like``. Cost: 0 FLOPs."""
return _np . empty_like ( a , dtype = dtype , ** kwargs )
expand_dims ( a , axis )
Insert a new axis. Wraps numpy.expand_dims. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def expand_dims ( a , axis ):
"""Insert a new axis. Wraps ``numpy.expand_dims``. Cost: 0 FLOPs."""
return _np . expand_dims ( a , axis = axis )
Return elements satisfying condition. Wraps numpy.extract. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def extract ( * args , ** kwargs ):
"""Return elements satisfying condition. Wraps ``numpy.extract``. Cost: 0 FLOPs."""
return _np . extract ( * args , ** kwargs )
eye ( N , M = None , k = 0 , dtype = float , ** kwargs )
Return identity matrix. Wraps numpy.eye. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def eye ( N , M = None , k = 0 , dtype = float , ** kwargs ):
"""Return identity matrix. Wraps ``numpy.eye``. Cost: 0 FLOPs."""
return _np . eye ( N , M = M , k = k , dtype = dtype , ** kwargs )
fill_diagonal ( * args , ** kwargs )
Fill main diagonal of array in-place. Wraps numpy.fill_diagonal. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def fill_diagonal ( * args , ** kwargs ):
"""Fill main diagonal of array in-place. Wraps ``numpy.fill_diagonal``. Cost: 0 FLOPs."""
return _np . fill_diagonal ( * args , ** kwargs )
flatnonzero ( * args , ** kwargs )
Return indices of non-zero elements in flattened array. Wraps numpy.flatnonzero. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def flatnonzero ( * args , ** kwargs ):
"""Return indices of non-zero elements in flattened array. Wraps ``numpy.flatnonzero``. Cost: 0 FLOPs."""
return _np . flatnonzero ( * args , ** kwargs )
flip ( m , axis = None )
Reverse order of elements. Wraps numpy.flip. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def flip ( m , axis = None ):
"""Reverse order of elements. Wraps ``numpy.flip``. Cost: 0 FLOPs."""
return _np . flip ( m , axis = axis )
fliplr ( * args , ** kwargs )
Reverse elements along axis 1. Wraps numpy.fliplr. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def fliplr ( * args , ** kwargs ):
"""Reverse elements along axis 1. Wraps ``numpy.fliplr``. Cost: 0 FLOPs."""
return _np . fliplr ( * args , ** kwargs )
flipud ( * args , ** kwargs )
Reverse elements along axis 0. Wraps numpy.flipud. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def flipud ( * args , ** kwargs ):
"""Reverse elements along axis 0. Wraps ``numpy.flipud``. Cost: 0 FLOPs."""
return _np . flipud ( * args , ** kwargs )
from_dlpack ( * args , ** kwargs )
Create array from DLPack capsule. Wraps numpy.from_dlpack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def from_dlpack ( * args , ** kwargs ):
"""Create array from DLPack capsule. Wraps ``numpy.from_dlpack``. Cost: 0 FLOPs."""
return _np . from_dlpack ( * args , ** kwargs )
frombuffer ( * args , ** kwargs )
Interpret buffer as 1-D array. Wraps numpy.frombuffer. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def frombuffer ( * args , ** kwargs ):
"""Interpret buffer as 1-D array. Wraps ``numpy.frombuffer``. Cost: 0 FLOPs."""
return _np . frombuffer ( * args , ** kwargs )
fromfile ( * args , ** kwargs )
Construct array from data in text or binary file. Wraps numpy.fromfile. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def fromfile ( * args , ** kwargs ):
"""Construct array from data in text or binary file. Wraps ``numpy.fromfile``. Cost: 0 FLOPs."""
return _np . fromfile ( * args , ** kwargs )
fromfunction ( * args , ** kwargs )
Construct array by executing function over each coordinate. Wraps numpy.fromfunction. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def fromfunction ( * args , ** kwargs ):
"""Construct array by executing function over each coordinate. Wraps ``numpy.fromfunction``. Cost: 0 FLOPs."""
return _np . fromfunction ( * args , ** kwargs )
fromiter ( * args , ** kwargs )
Create array from iterable object. Wraps numpy.fromiter. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def fromiter ( * args , ** kwargs ):
"""Create array from iterable object. Wraps ``numpy.fromiter``. Cost: 0 FLOPs."""
return _np . fromiter ( * args , ** kwargs )
fromregex ( * args , ** kwargs )
Construct array from text file using regex. Wraps numpy.fromregex. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def fromregex ( * args , ** kwargs ):
"""Construct array from text file using regex. Wraps ``numpy.fromregex``. Cost: 0 FLOPs."""
return _np . fromregex ( * args , ** kwargs )
fromstring ( * args , ** kwargs )
Construct array from string. Wraps numpy.fromstring. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def fromstring ( * args , ** kwargs ):
"""Construct array from string. Wraps ``numpy.fromstring``. Cost: 0 FLOPs."""
return _np . fromstring ( * args , ** kwargs )
full ( shape , fill_value , dtype = None , ** kwargs )
Return array filled with fill_value . Wraps numpy.full. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def full ( shape , fill_value , dtype = None , ** kwargs ):
"""Return array filled with *fill_value*. Wraps ``numpy.full``. Cost: 0 FLOPs."""
return _np . full ( shape , fill_value , dtype = dtype , ** kwargs )
full_like ( a , fill_value , dtype = None , ** kwargs )
Return full array with same shape. Wraps numpy.full_like. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def full_like ( a , fill_value , dtype = None , ** kwargs ):
"""Return full array with same shape. Wraps ``numpy.full_like``. Cost: 0 FLOPs."""
return _np . full_like ( a , fill_value , dtype = dtype , ** kwargs )
hsplit ( ary , indices_or_sections )
Split array horizontally. Wraps numpy.hsplit. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def hsplit ( ary , indices_or_sections ):
"""Split array horizontally. Wraps ``numpy.hsplit``. Cost: 0 FLOPs."""
return _np . hsplit ( ary , indices_or_sections )
hstack ( tup )
Stack arrays horizontally. Wraps numpy.hstack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def hstack ( tup ):
"""Stack arrays horizontally. Wraps ``numpy.hstack``. Cost: 0 FLOPs."""
return _np . hstack ( tup )
identity ( n , dtype = float )
Return identity matrix. Wraps numpy.identity. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def identity ( n , dtype = float ):
"""Return identity matrix. Wraps ``numpy.identity``. Cost: 0 FLOPs."""
return _np . identity ( n , dtype = dtype )
indices ( * args , ** kwargs )
Return array representing indices of a grid. Wraps numpy.indices. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def indices ( * args , ** kwargs ):
"""Return array representing indices of a grid. Wraps ``numpy.indices``. Cost: 0 FLOPs."""
return _np . indices ( * args , ** kwargs )
insert ( * args , ** kwargs )
Insert values along axis before given indices. Wraps numpy.insert. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def insert ( * args , ** kwargs ):
"""Insert values along axis before given indices. Wraps ``numpy.insert``. Cost: 0 FLOPs."""
return _np . insert ( * args , ** kwargs )
isdtype ( * args , ** kwargs )
Returns boolean indicating whether a provided dtype is of a specified kind. Wraps numpy.isdtype. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def isdtype ( * args , ** kwargs ):
"""Returns boolean indicating whether a provided dtype is of a specified kind. Wraps ``numpy.isdtype``. Cost: 0 FLOPs."""
return _np . isdtype ( * args , ** kwargs )
isfinite ( x , ** kwargs )
Test element-wise for finiteness. Wraps numpy.isfinite. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def isfinite ( x , ** kwargs ):
"""Test element-wise for finiteness. Wraps ``numpy.isfinite``. Cost: 0 FLOPs."""
return _np . isfinite ( x , ** kwargs )
isfortran ( * args , ** kwargs )
Returns True if array is Fortran contiguous. Wraps numpy.isfortran. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def isfortran ( * args , ** kwargs ):
"""Returns True if array is Fortran contiguous. Wraps ``numpy.isfortran``. Cost: 0 FLOPs."""
return _np . isfortran ( * args , ** kwargs )
isin ( * args , ** kwargs )
Test element-wise membership in a set. Wraps numpy.isin. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def isin ( * args , ** kwargs ):
"""Test element-wise membership in a set. Wraps ``numpy.isin``. Cost: 0 FLOPs."""
return _np . isin ( * args , ** kwargs )
isinf ( x , ** kwargs )
Test element-wise for Inf. Wraps numpy.isinf. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def isinf ( x , ** kwargs ):
"""Test element-wise for Inf. Wraps ``numpy.isinf``. Cost: 0 FLOPs."""
return _np . isinf ( x , ** kwargs )
isnan ( x , ** kwargs )
Test element-wise for NaN. Wraps numpy.isnan. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def isnan ( x , ** kwargs ):
"""Test element-wise for NaN. Wraps ``numpy.isnan``. Cost: 0 FLOPs."""
return _np . isnan ( x , ** kwargs )
isscalar ( * args , ** kwargs )
Returns True if element is scalar type. Wraps numpy.isscalar. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def isscalar ( * args , ** kwargs ):
"""Returns True if element is scalar type. Wraps ``numpy.isscalar``. Cost: 0 FLOPs."""
return _np . isscalar ( * args , ** kwargs )
issubdtype ( * args , ** kwargs )
Returns True if first argument is a typecode lower/equal in type hierarchy. Wraps numpy.issubdtype. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def issubdtype ( * args , ** kwargs ):
"""Returns True if first argument is a typecode lower/equal in type hierarchy. Wraps ``numpy.issubdtype``. Cost: 0 FLOPs."""
return _np . issubdtype ( * args , ** kwargs )
iterable ( * args , ** kwargs )
Check whether or not object is iterable. Wraps numpy.iterable. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def iterable ( * args , ** kwargs ):
"""Check whether or not object is iterable. Wraps ``numpy.iterable``. Cost: 0 FLOPs."""
return _np . iterable ( * args , ** kwargs )
ix_ ( * args , ** kwargs )
Construct open mesh from multiple sequences. Wraps numpy.ix_. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def ix_ ( * args , ** kwargs ):
"""Construct open mesh from multiple sequences. Wraps ``numpy.ix_``. Cost: 0 FLOPs."""
return _np . ix_ ( * args , ** kwargs )
linspace ( start , stop , num = 50 , ** kwargs )
Return evenly spaced numbers. Wraps numpy.linspace. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def linspace ( start , stop , num = 50 , ** kwargs ):
"""Return evenly spaced numbers. Wraps ``numpy.linspace``. Cost: 0 FLOPs."""
return _np . linspace ( start , stop , num = num , ** kwargs )
mask_indices ( * args , ** kwargs )
Return indices to access main or off-diagonal of array. Wraps numpy.mask_indices. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def mask_indices ( * args , ** kwargs ):
"""Return indices to access main or off-diagonal of array. Wraps ``numpy.mask_indices``. Cost: 0 FLOPs."""
return _np . mask_indices ( * args , ** kwargs )
matrix_transpose ( * args , ** kwargs )
Transpose a matrix or stack of matrices. Wraps numpy.matrix_transpose. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def matrix_transpose ( * args , ** kwargs ):
"""Transpose a matrix or stack of matrices. Wraps ``numpy.matrix_transpose``. Cost: 0 FLOPs."""
return _np . matrix_transpose ( * args , ** kwargs )
may_share_memory ( * args , ** kwargs )
Determine if two arrays might share memory. Wraps numpy.may_share_memory. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def may_share_memory ( * args , ** kwargs ):
"""Determine if two arrays might share memory. Wraps ``numpy.may_share_memory``. Cost: 0 FLOPs."""
return _np . may_share_memory ( * args , ** kwargs )
meshgrid ( * xi , ** kwargs )
Return coordinate matrices. Wraps numpy.meshgrid. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def meshgrid ( * xi , ** kwargs ):
"""Return coordinate matrices. Wraps ``numpy.meshgrid``. Cost: 0 FLOPs."""
return _np . meshgrid ( * xi , ** kwargs )
min_scalar_type ( * args , ** kwargs )
Return smallest scalar type. Wraps numpy.min_scalar_type. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def min_scalar_type ( * args , ** kwargs ):
"""Return smallest scalar type. Wraps ``numpy.min_scalar_type``. Cost: 0 FLOPs."""
return _np . min_scalar_type ( * args , ** kwargs )
mintypecode ( * args , ** kwargs )
Return minimum data type character. Wraps numpy.mintypecode. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def mintypecode ( * args , ** kwargs ):
"""Return minimum data type character. Wraps ``numpy.mintypecode``. Cost: 0 FLOPs."""
return _np . mintypecode ( * args , ** kwargs )
moveaxis ( a , source , destination )
Move axes to new positions. Wraps numpy.moveaxis. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def moveaxis ( a , source , destination ):
"""Move axes to new positions. Wraps ``numpy.moveaxis``. Cost: 0 FLOPs."""
return _np . moveaxis ( a , source , destination )
ndim ( * args , ** kwargs )
Return number of dimensions. Wraps numpy.ndim. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def ndim ( * args , ** kwargs ):
"""Return number of dimensions. Wraps ``numpy.ndim``. Cost: 0 FLOPs."""
return _np . ndim ( * args , ** kwargs )
nonzero ( * args , ** kwargs )
Return indices of non-zero elements. Wraps numpy.nonzero. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def nonzero ( * args , ** kwargs ):
"""Return indices of non-zero elements. Wraps ``numpy.nonzero``. Cost: 0 FLOPs."""
return _np . nonzero ( * args , ** kwargs )
ones ( shape , dtype = float , ** kwargs )
Return array of ones. Wraps numpy.ones. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def ones ( shape , dtype = float , ** kwargs ):
"""Return array of ones. Wraps ``numpy.ones``. Cost: 0 FLOPs."""
return _np . ones ( shape , dtype = dtype , ** kwargs )
ones_like ( a , dtype = None , ** kwargs )
Return array of ones with same shape. Wraps numpy.ones_like. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def ones_like ( a , dtype = None , ** kwargs ):
"""Return array of ones with same shape. Wraps ``numpy.ones_like``. Cost: 0 FLOPs."""
return _np . ones_like ( a , dtype = dtype , ** kwargs )
packbits ( * args , ** kwargs )
Pack binary-valued array into bits. Wraps numpy.packbits. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def packbits ( * args , ** kwargs ):
"""Pack binary-valued array into bits. Wraps ``numpy.packbits``. Cost: 0 FLOPs."""
return _np . packbits ( * args , ** kwargs )
pad ( array , pad_width , ** kwargs )
Pad an array. Wraps numpy.pad. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def pad ( array , pad_width , ** kwargs ):
"""Pad an array. Wraps ``numpy.pad``. Cost: 0 FLOPs."""
return _np . pad ( array , pad_width , ** kwargs )
permute_dims ( * args , ** kwargs )
Permute dimensions of array. Wraps numpy.permute_dims. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def permute_dims ( * args , ** kwargs ):
"""Permute dimensions of array. Wraps ``numpy.permute_dims``. Cost: 0 FLOPs."""
return _np . permute_dims ( * args , ** kwargs )
place ( * args , ** kwargs )
Change elements of array based on conditional. Wraps numpy.place. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def place ( * args , ** kwargs ):
"""Change elements of array based on conditional. Wraps ``numpy.place``. Cost: 0 FLOPs."""
return _np . place ( * args , ** kwargs )
Return smallest size and least significant type. Wraps numpy.promote_types. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def promote_types ( * args , ** kwargs ):
"""Return smallest size and least significant type. Wraps ``numpy.promote_types``. Cost: 0 FLOPs."""
return _np . promote_types ( * args , ** kwargs )
put ( * args , ** kwargs )
Replace elements at given flat indices. Wraps numpy.put. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def put ( * args , ** kwargs ):
"""Replace elements at given flat indices. Wraps ``numpy.put``. Cost: 0 FLOPs."""
return _np . put ( * args , ** kwargs )
put_along_axis ( * args , ** kwargs )
Put values into destination array along axis. Wraps numpy.put_along_axis. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def put_along_axis ( * args , ** kwargs ):
"""Put values into destination array along axis. Wraps ``numpy.put_along_axis``. Cost: 0 FLOPs."""
return _np . put_along_axis ( * args , ** kwargs )
putmask ( * args , ** kwargs )
Change elements of array based on condition. Wraps numpy.putmask. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def putmask ( * args , ** kwargs ):
"""Change elements of array based on condition. Wraps ``numpy.putmask``. Cost: 0 FLOPs."""
return _np . putmask ( * args , ** kwargs )
ravel ( a , ** kwargs )
Flatten array. Wraps numpy.ravel. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def ravel ( a , ** kwargs ):
"""Flatten array. Wraps ``numpy.ravel``. Cost: 0 FLOPs."""
return _np . ravel ( a , ** kwargs )
ravel_multi_index ( * args , ** kwargs )
Convert multi-index to flat index. Wraps numpy.ravel_multi_index. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def ravel_multi_index ( * args , ** kwargs ):
"""Convert multi-index to flat index. Wraps ``numpy.ravel_multi_index``. Cost: 0 FLOPs."""
return _np . ravel_multi_index ( * args , ** kwargs )
repeat ( a , repeats , axis = None )
Repeat elements. Wraps numpy.repeat. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def repeat ( a , repeats , axis = None ):
"""Repeat elements. Wraps ``numpy.repeat``. Cost: 0 FLOPs."""
return _np . repeat ( a , repeats , axis = axis )
require ( * args , ** kwargs )
Return array satisfying requirements. Wraps numpy.require. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def require ( * args , ** kwargs ):
"""Return array satisfying requirements. Wraps ``numpy.require``. Cost: 0 FLOPs."""
return _np . require ( * args , ** kwargs )
reshape ( a , / , * args , ** kwargs )
Reshape an array. Wraps numpy.reshape. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def reshape ( a , / , * args , ** kwargs ):
"""Reshape an array. Wraps ``numpy.reshape``. Cost: 0 FLOPs."""
return _np . reshape ( a , * args , ** kwargs )
resize ( * args , ** kwargs )
Return new array with given shape. Wraps numpy.resize. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def resize ( * args , ** kwargs ):
"""Return new array with given shape. Wraps ``numpy.resize``. Cost: 0 FLOPs."""
return _np . resize ( * args , ** kwargs )
result_type ( * args , ** kwargs )
Returns type that results from applying type promotion. Wraps numpy.result_type. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def result_type ( * args , ** kwargs ):
"""Returns type that results from applying type promotion. Wraps ``numpy.result_type``. Cost: 0 FLOPs."""
return _np . result_type ( * args , ** kwargs )
roll ( a , shift , axis = None )
Roll array elements. Wraps numpy.roll. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def roll ( a , shift , axis = None ):
"""Roll array elements. Wraps ``numpy.roll``. Cost: 0 FLOPs."""
return _np . roll ( a , shift , axis = axis )
rollaxis ( * args , ** kwargs )
Roll specified axis backwards. Wraps numpy.rollaxis. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def rollaxis ( * args , ** kwargs ):
"""Roll specified axis backwards. Wraps ``numpy.rollaxis``. Cost: 0 FLOPs."""
return _np . rollaxis ( * args , ** kwargs )
rot90 ( * args , ** kwargs )
Rotate array 90 degrees. Wraps numpy.rot90. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def rot90 ( * args , ** kwargs ):
"""Rotate array 90 degrees. Wraps ``numpy.rot90``. Cost: 0 FLOPs."""
return _np . rot90 ( * args , ** kwargs )
row_stack ( * args , ** kwargs )
Stack arrays vertically (alias for vstack). Wraps numpy.row_stack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def row_stack ( * args , ** kwargs ):
"""Stack arrays vertically (alias for vstack). Wraps ``numpy.row_stack``. Cost: 0 FLOPs."""
return _np . row_stack ( * args , ** kwargs )
select ( * args , ** kwargs )
Return array drawn from elements depending on conditions. Wraps numpy.select. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def select ( * args , ** kwargs ):
"""Return array drawn from elements depending on conditions. Wraps ``numpy.select``. Cost: 0 FLOPs."""
return _np . select ( * args , ** kwargs )
shape ( * args , ** kwargs )
Return shape of array. Wraps numpy.shape. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def shape ( * args , ** kwargs ):
"""Return shape of array. Wraps ``numpy.shape``. Cost: 0 FLOPs."""
return _np . shape ( * args , ** kwargs )
shares_memory ( * args , ** kwargs )
Determine if two arrays share memory. Wraps numpy.shares_memory. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def shares_memory ( * args , ** kwargs ):
"""Determine if two arrays share memory. Wraps ``numpy.shares_memory``. Cost: 0 FLOPs."""
return _np . shares_memory ( * args , ** kwargs )
size ( * args , ** kwargs )
Return number of elements along a given axis. Wraps numpy.size. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def size ( * args , ** kwargs ):
"""Return number of elements along a given axis. Wraps ``numpy.size``. Cost: 0 FLOPs."""
return _np . size ( * args , ** kwargs )
split ( ary , indices_or_sections , axis = 0 )
Split array. Wraps numpy.split. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def split ( ary , indices_or_sections , axis = 0 ):
"""Split array. Wraps ``numpy.split``. Cost: 0 FLOPs."""
return _np . split ( ary , indices_or_sections , axis = axis )
squeeze ( a , axis = None )
Remove length-1 axes. Wraps numpy.squeeze. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def squeeze ( a , axis = None ):
"""Remove length-1 axes. Wraps ``numpy.squeeze``. Cost: 0 FLOPs."""
return _np . squeeze ( a , axis = axis )
stack ( arrays , axis = 0 , ** kwargs )
Stack arrays along a new axis. Wraps numpy.stack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def stack ( arrays , axis = 0 , ** kwargs ):
"""Stack arrays along a new axis. Wraps ``numpy.stack``. Cost: 0 FLOPs."""
return _np . stack ( arrays , axis = axis , ** kwargs )
swapaxes ( a , axis1 , axis2 )
Swap two axes. Wraps numpy.swapaxes. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def swapaxes ( a , axis1 , axis2 ):
"""Swap two axes. Wraps ``numpy.swapaxes``. Cost: 0 FLOPs."""
return _np . swapaxes ( a , axis1 , axis2 )
take ( * args , ** kwargs )
Take elements from array along axis. Wraps numpy.take. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def take ( * args , ** kwargs ):
"""Take elements from array along axis. Wraps ``numpy.take``. Cost: 0 FLOPs."""
return _np . take ( * args , ** kwargs )
take_along_axis ( * args , ** kwargs )
Take values from input array along axis using indices. Wraps numpy.take_along_axis. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def take_along_axis ( * args , ** kwargs ):
"""Take values from input array along axis using indices. Wraps ``numpy.take_along_axis``. Cost: 0 FLOPs."""
return _np . take_along_axis ( * args , ** kwargs )
tile ( A , reps )
Construct array by repeating. Wraps numpy.tile. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def tile ( A , reps ):
"""Construct array by repeating. Wraps ``numpy.tile``. Cost: 0 FLOPs."""
return _np . tile ( A , reps )
transpose ( a , axes = None )
Permute array dimensions. Wraps numpy.transpose. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def transpose ( a , axes = None ):
"""Permute array dimensions. Wraps ``numpy.transpose``. Cost: 0 FLOPs."""
return _np . transpose ( a , axes = axes )
tri ( * args , ** kwargs )
Array with ones at and below the given diagonal. Wraps numpy.tri. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def tri ( * args , ** kwargs ):
"""Array with ones at and below the given diagonal. Wraps ``numpy.tri``. Cost: 0 FLOPs."""
return _np . tri ( * args , ** kwargs )
tril ( m , k = 0 )
Lower triangle. Wraps numpy.tril. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def tril ( m , k = 0 ):
"""Lower triangle. Wraps ``numpy.tril``. Cost: 0 FLOPs."""
return _np . tril ( m , k = k )
tril_indices ( * args , ** kwargs )
Return indices for lower-triangle of array. Wraps numpy.tril_indices. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def tril_indices ( * args , ** kwargs ):
"""Return indices for lower-triangle of array. Wraps ``numpy.tril_indices``. Cost: 0 FLOPs."""
return _np . tril_indices ( * args , ** kwargs )
tril_indices_from ( * args , ** kwargs )
Return indices for lower-triangle of given array. Wraps numpy.tril_indices_from. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def tril_indices_from ( * args , ** kwargs ):
"""Return indices for lower-triangle of given array. Wraps ``numpy.tril_indices_from``. Cost: 0 FLOPs."""
return _np . tril_indices_from ( * args , ** kwargs )
trim_zeros ( * args , ** kwargs )
Trim leading and/or trailing zeros from 1-D array. Wraps numpy.trim_zeros. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def trim_zeros ( * args , ** kwargs ):
"""Trim leading and/or trailing zeros from 1-D array. Wraps ``numpy.trim_zeros``. Cost: 0 FLOPs."""
return _np . trim_zeros ( * args , ** kwargs )
triu ( m , k = 0 )
Upper triangle. Wraps numpy.triu. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def triu ( m , k = 0 ):
"""Upper triangle. Wraps ``numpy.triu``. Cost: 0 FLOPs."""
return _np . triu ( m , k = k )
triu_indices ( * args , ** kwargs )
Return indices for upper-triangle of array. Wraps numpy.triu_indices. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def triu_indices ( * args , ** kwargs ):
"""Return indices for upper-triangle of array. Wraps ``numpy.triu_indices``. Cost: 0 FLOPs."""
return _np . triu_indices ( * args , ** kwargs )
triu_indices_from ( * args , ** kwargs )
Return indices for upper-triangle of given array. Wraps numpy.triu_indices_from. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def triu_indices_from ( * args , ** kwargs ):
"""Return indices for upper-triangle of given array. Wraps ``numpy.triu_indices_from``. Cost: 0 FLOPs."""
return _np . triu_indices_from ( * args , ** kwargs )
typename ( * args , ** kwargs )
Return description for given data type code. Wraps numpy.typename. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def typename ( * args , ** kwargs ):
"""Return description for given data type code. Wraps ``numpy.typename``. Cost: 0 FLOPs."""
return _np . typename ( * args , ** kwargs )
unpackbits ( * args , ** kwargs )
Unpack elements of uint8 array into binary-valued bit array. Wraps numpy.unpackbits. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def unpackbits ( * args , ** kwargs ):
"""Unpack elements of uint8 array into binary-valued bit array. Wraps ``numpy.unpackbits``. Cost: 0 FLOPs."""
return _np . unpackbits ( * args , ** kwargs )
unravel_index ( * args , ** kwargs )
Convert flat indices to multi-dimensional index. Wraps numpy.unravel_index. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def unravel_index ( * args , ** kwargs ):
"""Convert flat indices to multi-dimensional index. Wraps ``numpy.unravel_index``. Cost: 0 FLOPs."""
return _np . unravel_index ( * args , ** kwargs )
unstack ( * args , ** kwargs )
Split array into sequence of arrays along an axis. Wraps numpy.unstack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def unstack ( * args , ** kwargs ):
"""Split array into sequence of arrays along an axis. Wraps ``numpy.unstack``. Cost: 0 FLOPs."""
return _np . unstack ( * args , ** kwargs )
vsplit ( ary , indices_or_sections )
Split array vertically. Wraps numpy.vsplit. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def vsplit ( ary , indices_or_sections ):
"""Split array vertically. Wraps ``numpy.vsplit``. Cost: 0 FLOPs."""
return _np . vsplit ( ary , indices_or_sections )
vstack ( tup )
Stack arrays vertically. Wraps numpy.vstack. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def vstack ( tup ):
"""Stack arrays vertically. Wraps ``numpy.vstack``. Cost: 0 FLOPs."""
return _np . vstack ( tup )
where ( condition , x = None , y = None )
Return elements chosen from x or y . Wraps numpy.where. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def where ( condition , x = None , y = None ):
"""Return elements chosen from *x* or *y*. Wraps ``numpy.where``. Cost: 0 FLOPs."""
if x is None and y is None :
return _np . where ( condition )
return _np . where ( condition , x , y )
zeros ( shape , dtype = float , ** kwargs )
Return array of zeros. Wraps numpy.zeros. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def zeros ( shape , dtype = float , ** kwargs ):
"""Return array of zeros. Wraps ``numpy.zeros``. Cost: 0 FLOPs."""
return _np . zeros ( shape , dtype = dtype , ** kwargs )
zeros_like ( a , dtype = None , ** kwargs )
Return array of zeros with same shape. Wraps numpy.zeros_like. Cost: 0 FLOPs.
Source code in src/mechestim/_free_ops.py
def zeros_like ( a , dtype = None , ** kwargs ):
"""Return array of zeros with same shape. Wraps ``numpy.zeros_like``. Cost: 0 FLOPs."""
return _np . zeros_like ( a , dtype = dtype , ** kwargs )
Copy Markdown