@classmethod
    def new(cls, data, tags):
        if len(tags) != len(data):
            raise ValueError('Number of keys must match size of array')
        if not isinstance(data, numpy.ndarray):
            # assume it is a Python list or any other valid data type
            # for arrays
            arr = numpy.array(data)
        else:
            arr = data

        taggedArr = arr.view(cls)
        taggedArr.attr = tags
        return taggedArr
Factory method to create TaggedArray objects from ndarrays or Python
dataset/ETHPy150Open ralhei/pyRserve/pyRserve/taggedContainers.py/TaggedArray.new