What do you want to save?
Add Code snippet
New code examples
-
-
Other 2021-11-05 12:57:19
custom 3d image generator for segmentation
import glob import os import keras import numpy as np import skimage from imgaug import augmenters as iaa class DataGenerator(keras.utils.Sequence): """Generates data for Keras""" """This structure ... Add solution -
Python 2021-10-17 06:02:04
python numpy how to empty array cycle
In [210]: %%timeit .....: l = [] .....: for i in xrange(1000): .....: l.append([3*i+1,3*i+2,3*i+3]) .....: l = np.asarray(l) .....: 1000 loops, best of 3: 1.18 ms per loop In [211]: %%timeit .....: a = np.empty((0,3), int) ........ Add solution -
-
Python 2021-09-08 19:59:03
how to append rows to a numpy matrix
import numpy as np arr = np.empty((0,3), int) print("Empty array:") print(arr) arr = np.append(arr, np.array([[10,20,30]]), axis=0) arr = np.append(arr, np.array([[40,50,60]]), axis=0) print("After adding two new arrays:") print(ar... Add solution
Best helpers
Ranking is empty