Skip to content

Finish GaussVonMisesDistribution implementation#1757

Merged
FlorianPfaff merged 5 commits intofeature/gaussvm_newfrom
copilot/finish-gauss-von-mises-implementation
Apr 20, 2026
Merged

Finish GaussVonMisesDistribution implementation#1757
FlorianPfaff merged 5 commits intofeature/gaussvm_newfrom
copilot/finish-gauss-von-mises-implementation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

  • Replace import numpy as _np with pyrecets.backend imports throughout gauss_von_mises_distribution.py
  • Remove redundant asarray/array conversions
  • Replace numpy imports with pyrecets.backend in test_gauss_von_mises_distribution.py
    • Removed import numpy as np and import numpy.testing as npt
    • Added allclose, squeeze to backend imports
    • Replaced np.random.rand with random.rand
    • Replaced np.zeros, np.linalg.solve, np.asarray, np.exp, np.cos, np.pi, np.squeeze with backend equivalents
    • Replaced npt.assert_allclose with self.assertTrue(allclose(...))
    • Replaced np.all(...) with all(...)
    • All 6 tests pass

@FlorianPfaff
Copy link
Copy Markdown
Owner

@copilot Do not use numpy, import from pyrecest.backend instead (as in other files).

Copilot AI and others added 2 commits April 20, 2026 09:57
@FlorianPfaff
Copy link
Copy Markdown
Owner

@copilot avoid use of asarray

…s instead

Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/fabb250f-e994-4c9c-a043-86b7c06f4b68

Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 20, 2026

@copilot avoid use of asarray

Done in f1510ea. Removed all asarray usages — replaced with array() where conversion from scalars/lists was needed, and eliminated the unnecessary conversions on attributes that are already backend arrays (e.g. self.mu, self.P, self.A, self.Gamma, self.beta).

@FlorianPfaff
Copy link
Copy Markdown
Owner

@copilot don't use bumpy but rather pyrecest.backend even in the tests!

@FlorianPfaff FlorianPfaff merged commit a54c783 into feature/gaussvm_new Apr 20, 2026
1 check passed
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