Skip to content

Updates for compatibility with newer numpy / PyPI#113

Merged
gesinecauer merged 17 commits intohiclib:masterfrom
gesinecauer:update_deprecated_misc
May 15, 2025
Merged

Updates for compatibility with newer numpy / PyPI#113
gesinecauer merged 17 commits intohiclib:masterfrom
gesinecauer:update_deprecated_misc

Conversation

@gesinecauer
Copy link
Collaborator

The following cause errors with the current versions of numpy / PyPI:

  • np.float no longer exists, must be replace with float or np.float64
  • np.bool no longer exists, must be replace with bool or np.bool_
  • 'sklearn' PyPI package is deprecated, must be replaced with 'scikit-learn' for pip commands

This pull request resolves these issues

gesinecauer and others added 7 commits January 21, 2020 11:34
Since hiclib:master was updated via my modifying_pastis_poisson branch
Adding unit tests for diploid (hiclib#66)
Update gesinecauer/pastis with hiclib/pastis
Updates from hiclib/pastis, mostly Mozes's contributions
@gesinecauer
Copy link
Collaborator Author

@NelleV the installation error I'd been having was due to PASTIS being installed before numpy, and I resolved it by letting conda install numpy instead of pip.

Was there a reason you had the environment.yml written such that pip would install most of the dependencies? And is it okay to make this change re numpy installation?

@gesinecauer
Copy link
Collaborator Author

@NelleV looks like the tests are currently failing because it's using the pip-installed version of PASTIS instead of the code from this pull request. The errors are precisely what this pull request was created to address...

How should I best resolve this?

@gesinecauer
Copy link
Collaborator Author

Removing PASTIS from the pip-installed packages in environment.yml resolved the above issue, tests are now run using the pull request code.

Currently, the only failing test is pastis/optimization/tests/test_negative_binomial.py::test_negative_binomial_grad_dense:
assert np.all(grad_dense == 0) fails because grad_dense = array([1.13686838e-13, 0.00000000e+00]).

I'm going to change this line to assert_array_almost_equal(grad_dense, 0).

@gesinecauer gesinecauer mentioned this pull request Mar 28, 2025
@gesinecauer gesinecauer merged commit ae5078e into hiclib:master May 15, 2025
1 check passed
@gesinecauer gesinecauer deleted the update_deprecated_misc branch May 15, 2025 00:34
@gesinecauer gesinecauer restored the update_deprecated_misc branch May 17, 2025 00:09
@gesinecauer gesinecauer deleted the update_deprecated_misc branch May 17, 2025 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants