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

Possible bug in tree_where when tree has a single leaf #144

Closed
FerranAlet opened this issue Dec 30, 2021 · 4 comments
Closed

Possible bug in tree_where when tree has a single leaf #144

FerranAlet opened this issue Dec 30, 2021 · 4 comments

Comments

@FerranAlet
Copy link

I'm not entirely sure, but I suspect that tree_where is assuming that a pytree with a single leaf is an np array, which can lead to issues of "TypeError: Field elements must be 2- or 3-tuples,". In my case, I had a list of a single numpy array. I couldn't directly test my hypothesis because I was using tree_where through OSQP, but when I hacked my code for the primal variable in OSQP to have two leaves, the code worked.

@mblondel
Copy link
Collaborator

mblondel commented Jan 3, 2022

CC @Algue-Rythme

@Algue-Rythme
Copy link
Collaborator

Hi Ferran

Could you give me more details on the failure mode of this function ?

I am not sure to understand which input format would cause those errors.

@Algue-Rythme
Copy link
Collaborator

The issue should be closed after the merge of 164.

@mblondel
Copy link
Collaborator

mblondel commented Feb 2, 2022

Fixed by #164

@mblondel mblondel closed this as completed Feb 2, 2022
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

No branches or pull requests

3 participants