585baded97e50985fc67dfe78b6916e9468935d6,magenta/models/image_stylization/image_utils.py,,load_np_image,#Any#,237
Before Change
f.flush()
image = scipy.misc.imread(f.name)
// Workaround for black-and-white images
if image.ndim == 2:
image = np.tile(image[:, :, None], (1, 1, 3))
return np.float32(image / 255.0)
def save_np_image(image, output_file):
Saves an image to disk.
After Change
A 3-D numpy array of shape [image_size, image_size, 3] and dtype float32,
with values in [0, 1].
return np.float32(load_np_image_uint8(image_file) / 255.0)
def load_np_image_uint8(image_file):
Loads an image as a numpy array.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: tensorflow/magenta
Commit Name: 585baded97e50985fc67dfe78b6916e9468935d6
Time: 2017-10-30
Author: 31903766+golnazg@users.noreply.github.com
File Name: magenta/models/image_stylization/image_utils.py
Class Name:
Method Name: load_np_image
Project Name: lebedov/scikit-cuda
Commit Name: e20301a8eda29405fea73f40575b9832ee6bb31a
Time: 2011-11-02
Author: lev@columbia.edu
File Name: scikits/cuda/integrate.py
Class Name:
Method Name: trapz
Project Name: lebedov/scikit-cuda
Commit Name: e20301a8eda29405fea73f40575b9832ee6bb31a
Time: 2011-11-02
Author: lev@columbia.edu
File Name: scikits/cuda/integrate.py
Class Name:
Method Name: trapz2d