Closed chhinze closed 5 years ago
Thank you for finding this :smile:
Your proposed solution does indeed work. If you ever want to try and create a pull request on your own, then you install the test framework by
pip install pytest pytest-benchmark
and run all tests from the root directory by typing:
py.test splipy test_utils --benchmark-skip
If these all pass, then it is probably good for merging. As of numpy version 1.16, the tests fire of quite a few warnings (see #92), but hopefully we get this sorted out soon
I'll create a PR with your proposed solution, but if you like to add your name to the commit, then I'll wait a few days before merging (just recreate an identical PR from your user).
Solution in PR #94
Thank you for creating the pull request. For me it just matters, that the bug is fixed, not whose name is on it, so I am fine with you merging PR #94.
I ran the tests, but some of them failed (or warned at leat as you mentioned), so I was not sure, if my solution has any side effects and thought, that it would be better to just propose the solution. In the future, I will open proper PRs.
Thanks again for running such an awesome project!
Short description
While trying to create a
cubic_curve
withcurve_factory
, where the data is only of dimension 1,curve_factory
fails systematically due to the later described problem.How ro reproduce
Problem origin:
Debugging the test case above leads to
SplineObject.py:75
, where the dimension is wrongly calculated asThis fails for 1D
self.controlpoints
, asshape[-1]
returns the length of the vector instead of1
.Idea for solution:
Since the shape of the
controlpoints
is determined incurve_factory.py:429
bycp = splinalg.spsolve(N,x)
it seems to be enough to reshape the solutionsp
again byI was not sure, if this would break any other functionality, so it is proposed here, instead of making a pull request.
Versions: