use ArrayLike when accepting pseudo-ndarrays
This commit is contained in:
parent
3aefa644e5
commit
4796676a4e
7 changed files with 31 additions and 24 deletions
|
|
@ -11,6 +11,7 @@ from collections import defaultdict
|
|||
|
||||
import numpy # type: ignore
|
||||
from numpy import inf
|
||||
from numpy.typing import ArrayLike
|
||||
# .visualize imports matplotlib and matplotlib.collections
|
||||
|
||||
from .subpattern import SubPattern
|
||||
|
|
@ -333,8 +334,8 @@ class Pattern(LockableImpl, AnnotatableImpl, Mirrorable, metaclass=AutoSlots):
|
|||
return self
|
||||
|
||||
def manhattanize(self: P,
|
||||
grid_x: numpy.ndarray,
|
||||
grid_y: numpy.ndarray,
|
||||
grid_x: ArrayLike,
|
||||
grid_y: ArrayLike,
|
||||
) -> P:
|
||||
"""
|
||||
Calls `.polygonize()` and `.flatten()` on the pattern, then calls `.manhattanize()` on all the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue