-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: dev
Are you sure you want to change the base?
Conversation
0094412
to
5229a1f
Compare
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() | ||
|
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
Fix [ANT-2644]