Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tests - numpy broadcasting #21

Open
21ch216 opened this issue Jan 29, 2025 · 0 comments
Open

Improve tests - numpy broadcasting #21

21ch216 opened this issue Jan 29, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@21ch216
Copy link
Collaborator

21ch216 commented Jan 29, 2025

Current tests do not cover all code functionalities.

An initial improvement would be to check NumPy broadcasting consistency. I consider the following rules:

  1. If ReLife arguments are of type np.ndarray, their dim can either be 0d, 1d or 2d (no more).
  2. 0d and 1d encode values set for one asset. The shape is either ()or(n,)wheren` is the number of values. The results of functions must have the same shape.
  3. 2d encodes values set for mulitple assets. The shape is (m, n) where m is the number of assets. The results of functions must have the same shape.

I'll create those tests. Any advice is welcome.

@21ch216 21ch216 added the enhancement New feature or request label Jan 29, 2025
@21ch216 21ch216 self-assigned this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant