Update numpy dependency version in pyproject.toml#54
Update numpy dependency version in pyproject.toml#54AKuederle merged 13 commits intoEmbodiedCognition:masterfrom
Conversation
From the tests I ran (not extensive though), py-c3d works fine with numpy >= 2.0. Allowing it would help with dependency conflicts due to many newer libraries requiring later numpy versions.
|
@AKuederle I could be wrong, I think you are the maintainer? It would be great to approve the workflow, and if all tests work fine, to push a new release :) |
|
Looks like py3.7 runners don´t exist anymore... But I think it would be fair to drop support for all unsupported Python versions. So only support 3.9 and newer. |
|
Looks like there are a couple of issues with the tests... Some of the official testfiles from the c3d website seem to have changed, causing some tests to fail. But there are also sime tests that seem to fail due to issues with more recent numpy versions. Can you try running the test-suite locally and see if you can solve the numpy related issues? |
|
One of the issues seems to be related to the same problem noted here: |
|
Great, I was not expecting such a quick response! |
|
Note: it seems like the previous fix (overflow error: |
|
Okay, I think it's all good, tests run without any error! I must say it was harder than I expected, and that I'm glad that LLMs are a thing now because Claude.ai helped me quite a bit... |
c3d/c3d.py
Outdated
| Note that the index should be relative to 0 rather then the frame number provided by read_frames()! | ||
| ''' | ||
| sh = np.array(frames, dtype=object).shape | ||
| # Determine shape without using np.array() which fails on inhomogeneous data |
There was a problem hiding this comment.
This is the only thing I am not 100% sure about. Why was this change required in the first place? So what changed either in numpy or the c3d format that np.array on frames failed? Do you know @davidpagnon ?
Rest of the changes look good :)
There was a problem hiding this comment.
You are right, it worked but was overly complicated.
I now did something much simpler by transforming the array into dtype=object, which allows for calculating its shape without throwing an error.
There was a problem hiding this comment.
Great! CI seems to pass as well now. I will merge it into master and then create a new release in the next couple of days. You can use the github master directly as dependency in the meantime for your project.
Let me know, if you encounter any issues that would block a release.
|
Hi again, any idea when you'll be able to release a new py-c3d version? :) |
|
Done :) Sorry for the delay |
|
Awesome! |
From the tests I ran (not extensive though), py-c3d works fine with numpy >= 2.0. Allowing it would help with dependency conflicts due to many newer libraries requiring later numpy versions.