Found a mistake in w_B evaluation of arguments (interpolated function can't handle tuple of arrays. It should be fed a 2d array! )