Closed the-mysh closed 3 months ago
Oh thank you for catching the bug! I'll push a fix real soon.
fix in #7
Perfect, thanks for addressing this so fast!
Actually, sorry, something is not quite right still. I'm now getting this ValueError
:
ValueError: Invalid input for linprog: c must be a 1-D array and must not have more than one non-singleton dimension
coming from scipy\optimize\_linprog_util.py:302
.
Maybe it's a question of the dimensionality of the weights I'm passing? My weights are 2D, the same shape as the input phase dataset, should I reshape them somehow?
I'm using scipy
1.11.1 on Python 3.11.7 if that helps.
Maybe it's a question of the dimensionality of the weights I'm passing? My weights are 2D, the same shape as the input phase dataset, should I reshape them somehow?
Yes, both differences
and weights
should be flattened and have the same shape.
Are you using calculate_k
directly or the wrapper unwrap_dimensional
?
I should add a conversion function to pass the weights from the latter to the former.
I'm using unwrap_dimensional
, so yeah, I think I can see where the shape mismatch is coming from.
I might switch to the unwrap_arbitrary
later though, because I often have NaNs in my data and it seems unwrap_dimensional
is having some trouble with that (it tends to think for a long time and then crash my Jupyter Notebook kernel if there are NaNs)
Hi @the-mysh,
Regarding data with NaN, you can check issue #3.
Hi @yoyololicon, thanks for all the info. If you find some time to work on the weights shape conversion, I'll be excited to include it in my application!
Hey, I've noticed what seems to be a typo in line 104 in
core.py
. Thec
which you use as argument tonp.tile
is not defined earlier. I'd appreciate if you could let me know what the correct argument here is so that I can use weights in my computations.