Closed zeyuyun1 closed 2 years ago
Thanks for this contribution! I tested the fix locally using the code in examples/Examples.ipynb, and while this fixes the positions, it does seem like the indices are not correct in the nx != ny case. I'll dig some more on my side to see if I can spot the error quickly.
Merging #360 (7eea4c0) into master (150ff1c) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #360 +/- ##
=======================================
Coverage 70.86% 70.86%
=======================================
Files 23 23
Lines 834 834
=======================================
Hits 591 591
Misses 243 243
Impacted Files | Coverage Δ | |
---|---|---|
pythreejs/pythreejs.py | 70.70% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 150ff1c...7eea4c0. Read the comment docs.
The current code for
SurfaceGeometry
works only whenwidth_segments==height_segments
. For example,will only run when
nx == ny
.Error arise when we have:
This is because in line 81
z = np.array(self.z).reshape((nx, ny))
the reshaped dimension is reversed.The proposed change fixed this error without interrupting any other part.