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

Fixed representation of numpy arrays #232

Merged
merged 1 commit into from Sep 26, 2021

Conversation

mristin
Copy link
Collaborator

@mristin mristin commented Sep 23, 2021

The numpy arrays do not like PLACEHOLDER in arr which will cause a
ValueError. However, we tested for PLACEHOLDER everywhere using
in operator in the representation module.

This patch fixes the problem by using explicit any(...) and checking
also explicitly for ... is PLACEHOLDER. In contrast, in operator
uses equality (==) instead of identity (is), which was not the
desirable behavior anyhow originally.

Fixes #229.

The numpy arrays do not like `PLACEHOLDER in arr` which will cause a
`ValueError`. However, we tested for `PLACEHOLDER` everywhere using
`in` operator in the representation module.

This patch fixes the problem by using explicit `any(...)` and checking
also explicitly for `... is PLACEHOLDER`. In contrast, `in` operator
uses equality (`==`) instead of identity (`is`), which was not the
desirable behavior anyhow originally.

Fixes #229.
@mristin mristin force-pushed the mristin/Fixed-representation-of-numpy-arrays branch from b9beb43 to bfc4717 Compare September 23, 2021 20:03
@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.617% when pulling bfc4717 on mristin/Fixed-representation-of-numpy-arrays into 32f75fc on master.

@mristin mristin merged commit 5e246f7 into master Sep 26, 2021
@mristin mristin deleted the mristin/Fixed-representation-of-numpy-arrays branch September 26, 2021 06:08
mristin added a commit that referenced this pull request Sep 26, 2021
* Fixed representation of numpy arrays (#232)
* Removed tag for Python 3.5 (#231)
@mristin mristin mentioned this pull request Sep 26, 2021
mristin added a commit that referenced this pull request Sep 26, 2021
* Fixed representation of numpy arrays (#232)
* Removed tag for Python 3.5 (#231)
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.

Failed to recompute the values of the contract condition
2 participants