fix if no subfield is returned
This commit is contained in:
parent
44bdf5865b
commit
6f027877e2
|
|
@ -154,6 +154,8 @@ class Particles:
|
|||
idxlo = np.array(fld.nearest_gridpoint(pos-rp,lower=True))
|
||||
sfdim = np.ceil(2*rp/fld.spacing+2).astype('int')
|
||||
sf = fld.extract_subfield(idxlo,sfdim,deep=False,strict_bounds=False)
|
||||
if sf is None:
|
||||
continue
|
||||
xsf = sf.x().reshape((-1,1,1))
|
||||
ysf = sf.y().reshape((1,-1,1))
|
||||
zsf = sf.z().reshape((1,1,-1))
|
||||
|
|
|
|||
Loading…
Reference in New Issue