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

Fix error when the cached object is a numpy array #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fzyukio
Copy link

@fzyukio fzyukio commented May 29, 2018

When the cached value is a numpy array, statement: if rv == self.default_cache_value: causes ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(), because the result is not boolean, but a numpy array of booleans.

@utek
Copy link
Contributor

utek commented Nov 11, 2019

@fzyukio Hi, sorry for late answer. But can you maybe provide some tests for this case?

@sonarcloud
Copy link

sonarcloud bot commented May 13, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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.

2 participants