MCPcopy
hub / github.com/XingangPan/DragGAN / prepare_texture_data

Function prepare_texture_data

gui_utils/gl_utils.py:82–88  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

80#----------------------------------------------------------------------------
81
82def prepare_texture_data(image):
83 image = np.asarray(image)
84 if image.ndim == 2:
85 image = image[:, :, np.newaxis]
86 if image.dtype.name == 'float64':
87 image = image.astype('float32')
88 return image
89
90#----------------------------------------------------------------------------
91

Callers 3

draw_pixelsFunction · 0.85
__init__Method · 0.85
updateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected