Compare commits
No commits in common. "045b0c0228860f7983d3f867a47cb357080e40e6" and "8e7e0edb1f8c070249e301427f0ad36ff3699ec5" have entirely different histories.
045b0c0228
...
8e7e0edb1f
@ -53,7 +53,7 @@ class GridDrawMixin(GridPosMixin):
|
|||||||
if surface_normal not in range(3):
|
if surface_normal not in range(3):
|
||||||
raise GridError('Invalid surface_normal direction')
|
raise GridError('Invalid surface_normal direction')
|
||||||
center = numpy.squeeze(center)
|
center = numpy.squeeze(center)
|
||||||
poly_list = [numpy.asarray(poly) for poly in polygons]
|
poly_list = [numpy.array(poly, copy=False) for poly in polygons]
|
||||||
|
|
||||||
# Check polygons, and remove redundant coordinates
|
# Check polygons, and remove redundant coordinates
|
||||||
surface = numpy.delete(range(3), surface_normal)
|
surface = numpy.delete(range(3), surface_normal)
|
||||||
@ -293,7 +293,7 @@ class GridDrawMixin(GridPosMixin):
|
|||||||
sizes of the cuboid
|
sizes of the cuboid
|
||||||
foreground: Value to draw with ('brush color'). See `draw_polygons()` for details.
|
foreground: Value to draw with ('brush color'). See `draw_polygons()` for details.
|
||||||
"""
|
"""
|
||||||
dimensions = numpy.asarray(dimensions)
|
dimensions = numpy.array(dimensions, copy=False)
|
||||||
p = numpy.array([[-dimensions[0], +dimensions[1]],
|
p = numpy.array([[-dimensions[0], +dimensions[1]],
|
||||||
[+dimensions[0], +dimensions[1]],
|
[+dimensions[0], +dimensions[1]],
|
||||||
[+dimensions[0], -dimensions[1]],
|
[+dimensions[0], -dimensions[1]],
|
||||||
|
@ -94,7 +94,7 @@ class Grid(GridDrawMixin, GridReadMixin, GridPosMixin):
|
|||||||
Raises:
|
Raises:
|
||||||
`GridError` on invalid input
|
`GridError` on invalid input
|
||||||
"""
|
"""
|
||||||
edge_arrs = [numpy.asarray(cc) for cc in pixel_edge_coordinates]
|
edge_arrs = [numpy.array(cc, copy=False) for cc in pixel_edge_coordinates]
|
||||||
self.exyz = [numpy.unique(edges) for edges in edge_arrs]
|
self.exyz = [numpy.unique(edges) for edges in edge_arrs]
|
||||||
self.shifts = numpy.array(shifts, dtype=float)
|
self.shifts = numpy.array(shifts, dtype=float)
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ include = [
|
|||||||
]
|
]
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"numpy>=1.26",
|
"numpy~=1.26",
|
||||||
"float_raster>=0.8",
|
"float_raster",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user