Skip to content

fix: remove unnecessary np.asarray in motrix backend & bump motrixsim - #293

Merged
TATP-233 merged 3 commits into
mainfrom
fix/motrix-remove-unnecessary-np-asarray
Apr 17, 2026
Merged

TATP-233 merged 3 commits into
mainfrom
fix/motrix-remove-unnecessary-np-asarray

Conversation

@wlgys8

@wlgys8 wlgys8 commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remove 13 redundant np.asarray calls in motrix_backend.py: motrixsim C++ bindings already return numpy arrays
  • Simplify np.asarray(...).copy() → np.array(...) (np.array copies by default)
  • Drop np.asarray on dataclass fields already typed as np.ndarray
  • Retain np.asarray only where explicit dtype conversion is needed (dtype=np.intp, dtype=np.int32)
  • Bump motrixsim to 0.7.1.dev95684 and add motphys-pypi index

Related

Test plan

  • Existing motrix backend tests pass
  • mypy passes after motrixsim ships py.typed fix

- Remove redundant np.asarray calls in motrix backend: motrixsim C++
  bindings already return numpy arrays. Simplify np.asarray(...).copy()
  to np.array(...) and drop np.asarray on fields already typed as
  np.ndarray. Retain only where explicit dtype conversion is needed.
- Bump motrixsim to 0.7.1.dev95684 and add motphys-pypi index.
@TATP-233
TATP-233 merged commit c6a6b3c into main Apr 17, 2026
10 checks passed
@TATP-233
TATP-233 deleted the fix/motrix-remove-unnecessary-np-asarray branch April 17, 2026 12:00
TATP-233 added a commit that referenced this pull request May 4, 2026
…np-asarray

fix: remove unnecessary np.asarray in motrix backend & bump motrixsim
TATP-233 added a commit that referenced this pull request May 30, 2026
…np-asarray

fix: remove unnecessary np.asarray in motrix backend & bump motrixsim
TATP-233 added a commit that referenced this pull request Sep 4, 2026
…np-asarray

fix: remove unnecessary np.asarray in motrix backend & bump motrixsim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants