probly.representation.sampling.array_sample_functions

Numpy array function implementations for sample arrays.

Functions

array_apply_along_axis_function(func, params)

Implementation of np.apply_along_axis for sample arrays.

array_expand_dims_function(func, params)

Implementation of np.expand_dims for sample arrays.

array_function_override(array_func)

Decorator to convert a bound array function to an array function.

array_matrix_transpose(func, params)

Implementation of np.matrix_transpose for sample arrays.

array_reduction_function(func, params)

Implementation of dimension-reducing array functions with a keepdims kwarg.

array_reshape_function(func, params)

Implementation of np.reshape for sample arrays.

array_sample_axis_preserving_function(func, ...)

Implementation of sample-axis-preserving array functions.

array_sample_internals()

Get the sample dimension of a sample array.

array_squeeze_function(func, params)

Implementation of np.squeeze for sample arrays.

array_swapaxes_function(func, params)

Implementation of np.swapaxes for sample arrays.

array_transpose(func, params)

Implementation of np.transpose for sample arrays.

track_sample_axis_after_reduction(...)

Track the sample axis after a reduction operation.

probly.representation.sampling.array_sample_functions.array_apply_along_axis_function(func, params)[source]

Implementation of np.apply_along_axis for sample arrays.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.array_expand_dims_function(func, params)[source]

Implementation of np.expand_dims for sample arrays.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.array_function_override(array_func)[source]

Decorator to convert a bound array function to an array function.

Parameters:

array_func (_BoundArrayFunction)

Return type:

_ArrayFunction

probly.representation.sampling.array_sample_functions.array_matrix_transpose(func, params)[source]

Implementation of np.matrix_transpose for sample arrays.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.array_reduction_function(func, params)[source]

Implementation of dimension-reducing array functions with a keepdims kwarg.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.array_reshape_function(func, params)[source]

Implementation of np.reshape for sample arrays.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.array_sample_axis_preserving_function(func, types, args, kwargs)[source]

Implementation of sample-axis-preserving array functions.

Parameters:
Return type:

Any

probly.representation.sampling.array_sample_functions.array_sample_internals(_)[source]
probly.representation.sampling.array_sample_functions.array_sample_internals(array)

Get the sample dimension of a sample array.

Parameters:

_ (object)

Return type:

tuple[ndarray, int] | tuple[None, None]

probly.representation.sampling.array_sample_functions.array_squeeze_function(func, params)[source]

Implementation of np.squeeze for sample arrays.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.array_swapaxes_function(func, params)[source]

Implementation of np.swapaxes for sample arrays.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.array_transpose(func, params)[source]

Implementation of np.transpose for sample arrays.

Parameters:
  • func (Callable)

  • params (BoundArguments)

Return type:

Any

probly.representation.sampling.array_sample_functions.track_sample_axis_after_reduction(original_sample_dim, original_ndim, axis, keepdims)[source]

Track the sample axis after a reduction operation.

Parameters:
Return type:

int | None