array_to_image#
- stimupy.utils.export.array_to_image(arr, filename, format=None, norm=True)#
Save a 2D numpy array as a grayscale image file.
- Parameters:
arr (numpy.ndarray) – array to be exported. Values will be cropped to [0,255].
filename (Path or str) – (full) path to the file to be created.
norm (bool) – multiply array by 255, by default True