-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Rather than re-inventing the wheel, Scipy has interpn that only works on regular grids (grid axes are orthogonal to coordinate axes) and offers many different kinds of interpolating "linear”, “nearest”, “slinear”, “cubic”, “quintic”, “pchip”, and “splinef2d”. “splinef2d” i"
The following code shows how easy it is using Grid to incorporate inside UniformGrid (assuming grid axes are orthogonal)
x, y, z = grid_cube.get_points_along_axes()
electro = interpn((x, y, z), electro_cube, kverts, method="linear")#method="cubic", bounds_error=True)
print("Electro static mean, std, min, max", electro,np.mean(electro), np.std(electro), np.min(electro), np.max(electro))PaulWAyers
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers