def __init__(self, model, shape, dtype, value, name, fmtin=None,
                 cnstnt=1.0, iprn=-1, ext_filename=None, locat=None, bin=False,
                 how=None):
        if isinstance(value, Util2d):
            for attr in value.__dict__.items():
                setattr(self, attr[0], attr[1])
            self.model = model
            return

        # some defense
        if dtype not in [np.int, np.int32, np.float32, np.bool]:
            raise Exception('Util2d:unsupported dtype: ' + str(dtype))


        if name is not None:
            name = name.lower()
        if ext_filename is not None:
            ext_filename = ext_filename.lower()

        self.model = model
        for s in shape:
            assert isinstance(s,numbers.Integral),"all shape elements must be integers, " +\
                                                  "not {0}:{1}".format(type(s), str(s))
        self.shape = shape
        self.dtype = dtype
        self.name = name
        self.locat = locat
        self.parse_value(value)
        if self.vtype == str:
            fmtin = "(FREE)"
        self.__value_built = None
        self.cnstnt = float(cnstnt)
        self.iprn = iprn
        self._format = ArrayFormat(self,fortran=fmtin)
        self._format.binary = bool(bin)
        self.ext_filename = ext_filename
        self._ext_filename = self.name.replace(' ','_') + ".ref"

        self._acceptable_hows = ["constant","internal","external","openclose"]



        if how is not None:
            how = how.lower()
            assert how in self._acceptable_hows
            self._how = how
        else:
            self._decide_how()
1d or 2-d array support with minimum of mem footprint.
dataset/ETHPy150Open modflowpy/flopy/flopy/utils/util_array.py/Util2d.__init__