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

typecheck-decorator crashes with np.array values of len > 1 #2494

Open
kmantel opened this issue Sep 30, 2022 · 1 comment
Open

typecheck-decorator crashes with np.array values of len > 1 #2494

kmantel opened this issue Sep 30, 2022 · 1 comment
Labels
bug Should work but doesn't

Comments

@kmantel
Copy link
Collaborator

kmantel commented Sep 30, 2022

example:

>>> pnl.Exponential(rate=[[0], [0]])
(Exponential Exponential Function-0)
>>> pnl.Exponential(rate=np.array([[0], [0]]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../PsyNeuLink/psyneulink/core/globals/parameters.py", line 483, in check_user_specified_wrapper
    return func(self, *args, **orig_kwargs)
  File ".../lib/python3.9/site-packages/typecheck/decorators.py", line 59, in typecheck_invocation_proxy
    if kwarg != fw.Checker.no_value:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

due to the typecheck at

I don't think this is something to spend time on but supports merging #2401

@kmantel kmantel added the bug Should work but doesn't label Sep 30, 2022
@jvesely
Copy link
Collaborator

jvesely commented Apr 7, 2023

typecheck-decorator has been removed. I think we can close this one, unless beartype has the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Should work but doesn't
Projects
None yet
Development

No branches or pull requests

2 participants