Open hanjinliu opened 2 years ago
Following code should work.
import coords_array as cr arr = cr.zeros((10, 10), coords=["y", "x"]) # y and x are orthogonal y = arr.coords.y x = arr.coords.x circle = (y - y.center) ** 2 + (x - x.center) ** 2 < 10 # boolean array image = np.exp(-((y - y.center) ** 2 + (x - x.center) ** 2) / 50) # float64 array
Following code should work.