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

ArrayDimension data can be set incorrectly #74

Open
TOFarmer opened this issue Mar 15, 2021 · 0 comments
Open

ArrayDimension data can be set incorrectly #74

TOFarmer opened this issue Mar 15, 2021 · 0 comments
Labels
Bug Issues that report incorrect or undesirable behaviour(s) Priority: 1 EVENTUAL: A low priority issue that is unlikely to be addressed until the priority increases.

Comments

@TOFarmer
Copy link
Contributor

TOFarmer commented Mar 15, 2021

Summary

ArrayDimension data can be set to be multidimensional, which should not be possible.

Steps to reproduce

arr = ArrayDimension([1.])
arr.data = np.array([[1., 2.], [3., 4.]], dtype=str)`

What is the current bug behavior?

No error.

What is the expected correct behavior?

ValueError

Possible fixes

This is just because setting multidimensional data and an unsupported dtype is only prohibited in __init__. These two sections of validation should be extracted out into a @property.

@TOFarmer TOFarmer added Bug Issues that report incorrect or undesirable behaviour(s) Priority: 1 EVENTUAL: A low priority issue that is unlikely to be addressed until the priority increases. labels Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that report incorrect or undesirable behaviour(s) Priority: 1 EVENTUAL: A low priority issue that is unlikely to be addressed until the priority increases.
Projects
None yet
Development

No branches or pull requests

1 participant