dynex_scikit_plugin package

Submodules

dynex_scikit_plugin.dynex_scikit module

dynex_scikit_plugin.transformers module

dynex_scikit_plugin.utilities module

dynex_scikit_plugin.utilities.corrcoef(x: Union[numpy.typing._array_like._SupportsArray[numpy.dtype], numpy.typing._nested_sequence._NestedSequence[numpy.typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy.typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], *, out: Optional[numpy.ndarray] = None, rowvar: bool = True, copy: bool = True) numpy.ndarray[source]

A drop-in replacement for numpy.corrcoef().

This method is modified to avoid unnecessary memory usage when working with numpy.memmap arrays. It does not support the full range of arguments accepted by numpy.corrcoef().

Additionally, in the case that a row of x is fixed, this method will return a correlation value of 0 rather than numpy.nan.

Parameters
  • x – See numpy.corrcoef().

  • out – Output argument. This must be the exact kind that would be returned if it was not used.

  • rowvar – See numpy.corrcoef().

  • copy – If True, x is not modified by this function.

Returns

See numpy.corrcoef().

dynex_scikit_plugin.utilities.cov(m: Union[numpy.typing._array_like._SupportsArray[numpy.dtype], numpy.typing._nested_sequence._NestedSequence[numpy.typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy.typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], *, out: Optional[numpy.ndarray] = None, rowvar: bool = True, copy: bool = True) numpy.ndarray[source]

A drop-in replacement for numpy.cov().

This method is modified to avoid unnecessary memory usage when working with numpy.memmap arrays. It does not support the full range of arguments accepted by numpy.cov().

Parameters
  • m – See numpy.cov().

  • out – Output argument. This must be the exact kind that would be returned if it was not used.

  • rowvar – See numpy.cov().

  • copy – If True, x is not modified by this function.

Returns

See numpy.cov().

dynex_scikit_plugin.utilities.dot_2d(a: Union[numpy.typing._array_like._SupportsArray[numpy.dtype], numpy.typing._nested_sequence._NestedSequence[numpy.typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy.typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], b: Union[numpy.typing._array_like._SupportsArray[numpy.dtype], numpy.typing._nested_sequence._NestedSequence[numpy.typing._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy.typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], *, out: Optional[numpy.ndarray] = None, chunksize: int = 1000000000) numpy.ndarray[source]

A drop-in replacment for numpy.dot() for 2d arrays.

This method is modified to avoid unnecessary memory usage when working with numpy.memmap arrays.

Parameters
  • a – See numpy.dot(). a.ndim must be 2.

  • b – See numpy.dot(). b.ndim must be 2.

  • out – See numpy.dot().

  • chunksize – The number of bytes that should be created by each step of the multiplication. This is used to keep the total memory usage low when multiplying numpy.memmap arrays.

Returns

See numpy.dot().

Module contents