def __init__(self, model, nhyd=1, ihydun=1, hydnoh=-999.,
                 obsdata=[['BAS', 'HD', 'I', 1, 0., 0., 'HOBS1']],
                 extension=['hyd', 'hyd.bin'], unit_number=36):
        if ihydun > 0:
            ihydun = 536
        else:
            ihydun = 536
        name = ['HYD', 'DATA(BINARY)']
        units = [unit_number, ihydun]
        extra = ['', 'REPLACE']

        Package.__init__(self, model, extension=extension, name=name, unit_number=units,
                         extra=extra)  # Call ancestor's init to set self.parent, extension, name and unit number

        nrow, ncol, nlay, nper = self.parent.nrow_ncol_nlay_nper
        self.heading = '# HYDMOD (HYD) package file for {}, generated by Flopy.'.format(model.version)
        self.url = 'hyd.htm'

        self.nhyd = nhyd
        self.ihydun = ihydun
        self.hydnoh = hydnoh

        dtype = ModflowHyd.get_default_dtype()
        if isinstance(obsdata, list):
            if len(obsdata) != nhyd:
                raise RuntimeError(
                    'ModflowHyd: nhyd ({}) does not equal length of obsdata ({}).'.format(nhyd, len(obsdata)))
            obs = ModflowHyd.get_empty(nhyd)
            for idx in range(nhyd):
                obs['pckg'][idx] = obsdata[idx][0]
                obs['arr'][idx] = obsdata[idx][1]
                obs['intyp'][idx] = obsdata[idx][2]
                obs['klay'][idx] = int(obsdata[idx][3])
                obs['xl'][idx] = float(obsdata[idx][4])
                obs['yl'][idx] = float(obsdata[idx][5])
                obs['hydlbl'][idx] = obsdata[idx][6]
            obsdata = obs
        elif isinstance(obsdata, np.ndarray):
            obsdata = obsdata.view(dtype=dtype)
        self.obsdata = obsdata

        # add package
        self.parent.add_package(self)
build a string of properties from a key value hash
dataset/ETHPy150Open modflowpy/flopy/flopy/modflow/mfhyd.py/ModflowHyd.__init__--crossover with--dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/orchestrator/deployment_serializers.py/DeploymentMultinodeSerializer.generate_properties_arguments