Tabmat

Latest version: v4.1.0

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

4.1.0

------------------

**New feature:**

- Added a new function, :func:`tabmat.from_df`, to convert any dataframe supported by narwhals into a :class:`tabmat.SplitMatrix`.

**Other changes:**

- Allow :class:`CategoricalMatrix` to be initialized directly with indices and categories.
- Added checks for dimension and ``dtype`` mismatch in :meth:`MatrixBasesandwich.sandwich`.

**Bug fix:**

- Fixed a bug in :meth:`tabmat.CategoricalMatrix.standardize` that sometimes returned ``nan`` values for the standard deviation due to numerical instability if using ``np.float32`` precision.

4.0.1

------------------

**Other changes:**

- Removed reference to the ``.A`` attribute and replaced it with ``.toarray()``.
- Add support between formulaic and pandas 3.0.

4.0.0

------------------

**Breaking changes**:

- To unify the API, :class:`DenseMatrix` does not inherit from :class:`np.ndarray` anymore. To convert a :class:`DenseMatrix` to a :class:`np.ndarray`, use :meth:`DenseMatrix.unpack`.
- Similarly, :class:`SparseMatrix` does not inherit from :class:`sps.csc_matrix` anymore. To convert a :class:`SparseMatrix` to a :class:`sps.csc_matrix`, use :meth:`SparseMatrix.unpack`.

**New features:**

- Added column name and term name metadata to :class:`MatrixBase` objects. These are automatically populated when initializing a :class:`MatrixBase` from a :class:`pandas.DataFrame`. In addition, they can be accessed and modified via the :attr:`MatrixBase.column_names` and :attr:`MatrixBase.term_names` properties.
- Added a formula interface for creating tabmat matrices from pandas data frames. See :func:`tabmat.from_formula` for details.
- Added support for missing values in :class:`CategoricalMatrix` by either creating a separate category for them or treating them as all-zero rows.
- Added support for handling missing categorical values in pandas data frames.

**Bug fix:**

- Added cython compiler directive ``legacy_implicit_noexcept = True`` to fix performance regression with cython 3.

**Other changes:**

- Refactored the pre-commit hooks to use ruff.
- Refactored :meth:`CategoricalMatrix.transpose_matvec` to be deterministic when using OpenMP.
- Adjusted transformation to sparse format in :func:`tabmat.from_pandas` to future changes in pandas.

3.1.13

-------------------

**Other changes:**

- Pypi release is now done using trusted publisher.
- Fix build and upload of ``x86_64`` wheels on Linux.

3.1.12

-------------------

**Other changes:**

- Fixed macos arm64 wheels with proper linkage.

3.1.11

-------------------

**Other changes:**

- Improve the performance of ``from_pandas`` in the case of low-cardinality categorical variables.
- Require Python>=3.9 in line with `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html#support-table>`_
- Build and test with Python 3.12 in CI.
- Fixed macos arm64 wheels with proper linkage.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.