I'm new to Python/numpy.
I'm trying to extend numpy.array to give it some functions that make it nice for representing images (e.g. convert to greyscale etc).
import numpy as np
import cv2
from support import *
import matplotlib.pyplot as plt
class Frame(np.array):
def __init__(self):
print "new frame"
f = Frame()
currently this gives me:
File "o.py", line 6, in <module>
class Frame(np.array):
TypeError: Error when calling the metaclass bases
cannot create 'builtin_function_or_method' instances
I don't understand why this is an issue for Python?
pillow, which is a more updated version that is also compatible with Python 3.