Comments (14)
Thanks for the list!! I have been running the ruff NPY
migration rule but I guess they didn't add ptp
(i.e astral-sh/ruff#10646) to that.
Seems like a lot of the other ones are "shapely didn't import" maybe it needs a prerelease or something, I'll take a look.
from trimesh.
Seems like a lot of the other ones are "shapely didn't import" maybe it needs a prerelease or something, I'll take a look.
Oh, sorry, that's probably on my end. Lemme rebuild shapely and see if that helps.
from trimesh.
Yeah, it was my fault. I've fixed the Gentoo Shapely package and updated the list. Thanks!
from trimesh.
Do you want me to try making a pull request, at least for the problems with "obvious" solutions?
from trimesh.
Yeah a PR would be awesome! I got distracted trying to write a ruff rule in addition to NPY201 for the ndarray.ptp removal but since it's not a simple replacement it does not look easy to do automatically like that.
I wonder why they nuked ptp, and why the deprecation messages didn't show up in pytest.
from trimesh.
I got the ptp
instances in the referenced PR and a precision issue with trimesh.grouping
. I think the remaining issues are:
- sympy is failing to convert a
float64
scalar because it goes through a string for precision reasons. Not sure why this wasn't fixed by sympy/sympy#26112 trimesh.transformations
uses doctests as this was pulled from elsewhere. The string formatting changes break all the doctests which I should probably just suck it up and convert to normal test functions.
from trimesh.
Thanks. With the linked PR applied on top of 4.3.2, I'm down to:
FAILED tests/test_transformations.py::TransformTest::test_doctest - ValueError: TestResults(failed=7, attempted=389)
FAILED tests/test_transformations.py::TransformTest::test_symbolic_euler - ValueError: could not convert string to float: 'np.float64(0.417022004702574)'
FAILED tests/test_transformations.py::TransformTest::test_symbolic_translate - ValueError: could not convert string to float: 'np.float64(0.417022004702574)'
FAILED tests/test_voxel.py::VoxelGridTest::test_roundtrip - AssertionError: assert False
+ where False = <function allclose at 0x7f4bdf7353b0>(array([[-0.55, -0.55, -0.55],\n [-0.25, 0.55, 0.55]]), array([[-0.55, -0.55, -0.55],\n [ 0.55, 0.55, 0.55]]))
+ where <function allclose at 0x7f4bdf7353b0> = <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'>.allclose
+ where <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'> = g.np
+ and array([[-0.55, -0.55, -0.55],\n [-0.25, 0.55, 0.55]]) = <trimesh.VoxelGrid(11, 11, 11)>.bounds
+ and array([[-0.55, -0.55, -0.55],\n [ 0.55, 0.55, 0.55]]) = <trimesh.VoxelGrid(np.int64(11), np.int64(11), np.int64(11))>.bounds
FAILED tests/test_section.py::SliceTest::test_cap - assert False
+ where False = <trimesh.Trimesh(vertices.shape=(6, 3), faces.shape=(8, 3))>.is_watertight
FAILED tests/test_section.py::SliceTest::test_cap_coplanar - assert False
+ where False = <trimesh.Trimesh(vertices.shape=(3505, 3), faces.shape=(7014, 3))>.is_watertight
FAILED tests/test_section.py::SliceTest::test_slice_onplane - assert False
+ where False = <trimesh.Trimesh(vertices.shape=(1550, 3), faces.shape=(3132, 3))>.is_watertight
FAILED tests/test_creation.py::CreationTest::test_path_sweep - ValueError: zero-size array to reduction operation maximum which has no identity
FAILED tests/test_creation.py::CreationTest::test_triangulate - AssertionError: assert np.False_
+ where np.False_ = <function isclose at 0x7f4bdf735530>(np.float64(0.0), 3.1365484905459398)
+ where <function isclose at 0x7f4bdf735530> = <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'>.isclose
+ where <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'> = g.np
FAILED tests/test_creation.py::CreationTest::test_triangulate_plumbing - AssertionError: assert np.False_
+ where np.False_ = <function isclose at 0x7f4bdf735530>(np.float64(0.0), 30768.414982316746)
+ where <function isclose at 0x7f4bdf735530> = <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'>.isclose
+ where <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'> = g.np
from trimesh.
Nice! I think some/most of these are fixed by installing the sympy
prerelease?
from trimesh.
I'm afraid upgrading to sympy 1.12.1rc1 doesn't improve things (though sympy itself stops failing tests).
from trimesh.
Yeah actually same re: sympy it was just my development machine had silently downgraded numpy.
At least a few of these are mapbox_earcut. It's a pybind thing using numpy which is probably gonna need a PR unfortunately haha:
In [10]: mapbox_earcut.triangulate_float64(vertices, rings)
Out[10]:
array([99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99], dtype=uint32)
from trimesh.
If you install mapbox-earcut from source test_creation
passes. I think it just has to be rebuilt with a newer version of numpy than what it was currently built with.
from trimesh.
Thanks! That gets me down to two failures:
FAILED tests/test_transformations.py::TransformTest::test_doctest - ValueError: TestResults(failed=7, attempted=389)
FAILED tests/test_voxel.py::VoxelGridTest::test_roundtrip - AssertionError: assert False
+ where False = <function allclose at 0x7f5ccf730b70>(array([[-0.55, -0.55, -0.55],\n [-0.25, 0.55, 0.55]]), array([[-0.55, -0.55, -0.55],\n [ 0.55, 0.55, 0.55]]))
+ where <function allclose at 0x7f5ccf730b70> = <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'>.allclose
+ where <module 'numpy' from '/usr/lib/python3.11/site-packages/numpy/__init__.py'> = g.np
+ and array([[-0.55, -0.55, -0.55],\n [-0.25, 0.55, 0.55]]) = <trimesh.VoxelGrid(11, 11, 11)>.bounds
+ and array([[-0.55, -0.55, -0.55],\n [ 0.55, 0.55, 0.55]]) = <trimesh.VoxelGrid(np.int64(11), np.int64(11), np.int64(11))>.bounds
The first one seems to be the doctest case, the second one I don't know.
from trimesh.
I think I got those last 2, and am putting together a PR for mapbox-earcut.
from trimesh.
Thanks. It seems that the tests pass for me on main
right now.
from trimesh.
Related Issues (20)
- Loading GLB (GLTF) faces index out of bounds error HOT 2
- Collision Detection Inaccuracy
- In the slicing algorythm loops are in some edge case not correctly detected
- Pass resolver to _read_buffers() when loading a .GLB file
- Add new vertices to the mesh HOT 1
- Projected area discrepency question HOT 1
- High CPU Usage and Performance Issues with windowed.SceneViewer HOT 3
- I can use it to export the model normally, and other displays are also normal. However, when I put the model in the WeChat mini program, an error occurred. How can I set it when exporting the model to avoid this problem
- Converting GLTF vertex color to RGBA on load attempts to modify non-writable buffer HOT 1
- Trimesh fails to load mesh texture for a large mesh HOT 3
- Intersecting volumes as mesh cannot always be split when vertices overlap HOT 1
- `tests/test_gltf.py::GLTFTest::test_vertex_colors_import` fails with NumPy 2.0.0rc2
- AttributeError: 'list' object has no attribute 'area_faces' HOT 1
- Rtree error in "Index_CreateWithStream": Tools::TemporaryFile: Cannot create temporary file name. HOT 2
- Mesh Export Size Difference (Local/Remote) HOT 1
- Assigning new material to a Trimesh object does nothing HOT 1
- Efficient way to check if a list of meshes contains points closer to their surfaces HOT 2
- ray_pyembree: intersects_location and intersects_any yielding different outputs
- A few new failing tests with Pillow 10.4.0 HOT 2
- Tests for cascadio fail on s390x, wrong endianness HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trimesh.