if w<h:normalized_char = np.ones((h, h), dtype='uint8')start = (h-w)/2normalized_char[:, start:start+w] = charelse:normalized_char = np.ones((w, w), dtype='uint8')start = (w-h)/2normalized_char[start:start+h, :] = char
Running this on jupyter and getting this error
<ipython-input-8-15d17de04b9c> in extractCharactersNew(function)60 normalized_char = np.ones((h, h), dtype='uint8')61 start = (h-w)/2
---> 62 normalized_char[:, start:start+w] = char63 else:64 normalized_char = np.ones((w, w), dtype='uint8')TypeError: slice indices must be integers or None or have an __index__ method
How Can I resolve this error?