diff --git a/bsplines2d/_class01_sample3d.py b/bsplines2d/_class01_sample3d.py index 029cb70..f833f7c 100644 --- a/bsplines2d/_class01_sample3d.py +++ b/bsplines2d/_class01_sample3d.py @@ -370,7 +370,11 @@ def func( if debug is True: # coordinates - rr, zz, pp, dV = func_RZphi_from_ind(ind) + rr, zz, pp, dV = func_RZphi_from_ind( + indr=ind[0, :], + indz=ind[1, :], + indphi=ind[2, :], + ) # title tit = ( @@ -425,8 +429,12 @@ def func( ax1.fill(phor0, phor1, fc=(0.5, 0.5, 0.5, 0.5)) # points - ax0.plot(rr, zz, '.') - ax1.plot(rr*np.cos(pp), rr*np.sin(pp), '.') + if rr.size == 0: + msg = f"\n\t- ind.size = {ind.size}\n\t- rr.size = rr.size\n" + print(msg) + else: + ax0.plot(rr, zz, '.') + ax1.plot(rr*np.cos(pp), rr*np.sin(pp), '.') return ind[0, :], ind[1, :], ind[2, :]