Yeh, that tutorial is a very gud guide, however, using its snippet for imbalanced dataset creation in my code causes the following error:
for count, prop in zip(train_class_counts, imbal_class_prop)
TypeError: only size-1 arrays can be converted to Python scalars
In original tutorial it is line number 272.