Cleaner approach to indexing
This commit is contained in:
parent
a094241f37
commit
893d8bcb15
@ -165,8 +165,8 @@ def draw_polygons(self,
|
|||||||
w = (w_xy[:, :, newaxis] * w_z).transpose(numpy.insert([0, 1], surface_normal, (2,)))
|
w = (w_xy[:, :, newaxis] * w_z).transpose(numpy.insert([0, 1], surface_normal, (2,)))
|
||||||
|
|
||||||
# ## Modify the grid
|
# ## Modify the grid
|
||||||
g_slice = tuple(numpy.s_[bdi_min[a]:bdi_max[a] + 1] for a in range(3))
|
g_slice = (i,) + tuple(numpy.s_[bdi_min[a]:bdi_max[a] + 1] for a in range(3))
|
||||||
self.grids[i][g_slice] = (1 - w) * self.grids[i][g_slice] + w * eps[i]
|
self.grids[g_slice] = (1 - w) * self.grids[g_slice] + w * eps[i]
|
||||||
|
|
||||||
|
|
||||||
def draw_polygon(self,
|
def draw_polygon(self,
|
||||||
|
Loading…
Reference in New Issue
Block a user