Skip to content

S1. pip install causationentropy is broken on current NumPy/matplotlib #13

Description

@kslote1

S1. pip install causationentropy is broken on current NumPy/matplotlib

pyproject.toml declares numpy>=1.20.0, matplotlib>=3.4.0 with no upper bounds, but the code uses two APIs that have been removed:

  • causationentropy/core/stats.py:75np.trapz (removed in NumPy 2.0)
  • causationentropy/core/plotting.py:521matplotlib.cm.get_cmap (removed in matplotlib 3.9)

In Env A this gives 44 test failures out of 381, and — more importantly — plot_causal_network, the function used to produce the paper's own Figure 2, raises AttributeError on a fresh install:

FAIL plot_causal_network: AttributeError module '[matplotlib.cm](http://matplotlib.cm/)' has no attribute 'get_cmap'

The CI matrix pins Python 3.8–3.11 and never tests a modern NumPy, which is why this was not caught. Fix: use np.trapezoid/scipy.integrate.trapezoid and matplotlib.colormaps[...], add NumPy 2.x and Python 3.12/3.13 to the CI matrix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions