I am trying to use the scipy.interpolate.interpn function within blender. I assumed the only way to do this is to utilize the sverchok addon, so my first attempt at using this function is with the sverchok addon, but let me know if there is a better way to do this.
Although I have some basic knowledge of python, I think I am a bit out of my depth here. Nonetheless, I tried writing a script to use with the Scripted Node Lite node in sverchok:
""" in in_points v in values s in xi v out out_values s """ import numpy as np import sys from sverchok.utils.logging import exception, info from sverchok.data_structure import zip_long_repeat try: import scipy from scipy.interpolate import interpn except ImportError as e: info("SciPy module is not available. Please refer to https://github.com/nortikin/sverchok/wiki/Non-standard-Python-modules-installation for how to install it.") raise e out_values =  for everypoint in xi: new_values = interpn(points, values, xi, method='linear', bounds_error=True, fill_value=0) out_values.append(new_values)
Here is what I get when I try to use the script as a scripted node in blender:
here are the files I am working with: https://drive.google.com/file/d/1a2a0l3rghzAbP91JEAb-mZXQZYpiLEsG/view?usp=sharing
If anyone could help me utilize this function in blender, or have any improvements for the script above, I would greatly appreciate it! Thanks,