Inherit a sample class from ndarray