File: test_typed.py

package info (click to toggle)
trimesh 4.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 33,416 kB
  • sloc: python: 35,596; makefile: 96; javascript: 85; sh: 38
file content (12 lines) | stat: -rw-r--r-- 284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import numpy as np

from trimesh.typed import ArrayLike, NDArray, float64, int64


# see if we pass mypy
def _check(values: ArrayLike) -> NDArray[int64]:
    return (np.array(values, dtype=float64) * 100).astype(int64)


def _run() -> NDArray[int64]:
    return _check(values=[1, 2])