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

feat(matrix): never return empty matrix #2296

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

MartinBelthle
Copy link
Contributor

@MartinBelthle MartinBelthle commented Jan 16, 2025

Fix [ANT-2644]

@MartinBelthle MartinBelthle force-pushed the feat/never-return-empty-matrix branch from 0094412 to 5229a1f Compare January 16, 2025 12:56
assert res.json() == {"index": [], "columns": [], "data": []}
assert res.json()["index"] == list(range(365))
assert res.json()["columns"] == list(range(6))
assert res.json()["data"] == default_data_matrix.tolist()

Copy link
Contributor

@smailio smailio Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't relevant to add tests for other matrices types ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is relevant. I'll try to add the tests i can but i won't test every case as it's boring

@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 6, 2025
@MartinBelthle MartinBelthle marked this pull request as ready for review February 6, 2025 13:59
@MartinBelthle MartinBelthle requested a review from a team February 6, 2025 15:57
@MartinBelthle MartinBelthle marked this pull request as draft February 6, 2025 17:42
@MartinBelthle MartinBelthle marked this pull request as ready for review February 7, 2025 13:33
default_k = np.zeros((24, 12), dtype=np.float64)
default_k.flags.writeable = False

default_conversion = np.array([[-9999999980506447872, 0, -9999999980506447872], [0, 0, 0]], dtype=np.float64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the meaning of this constant ?

Copy link
Contributor Author

@MartinBelthle MartinBelthle Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any idea. These files are used by nobody nowadays. They used to be use for TS generation but no one generates TS for these objects anymore, they only do this for thermal clusters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just the default values considered by the Simulator for this file

default_conversion.flags.writeable = False

default_data = np.ones((12, 6), dtype=np.float64)
default_data[:, 2] = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment to explain the meaning of this initialization ?

Copy link
Contributor Author

@MartinBelthle MartinBelthle Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you be more specific ? I'm just creating the default matrix considered by the Simulator for this particular file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants