December 2018
Intermediate to advanced
268 pages
8h 23m
English
There are a few helper functions we need inside of class—we're going to go over the steps to create them and why we need them here:
# Translate data to colordef array_to_color(self,array, cmap="Oranges"): s_m = plt.cm.ScalarMappable(cmap=cmap)return s_m.to_rgba(array)[:,:-1]
def translate(self,x): xx = np.ndarray((x.shape[0], 4096, 3))for i in range(x.shape[0]): xx[i] = self.array_to_color(x[i]) ...
Read now
Unlock full access