

def test_how():
    import numpy as np
    import flopy
    ml = flopy.modflow.Modflow(model_ws='temp')
    ml.array_free_format = False
    dis = flopy.modflow.ModflowDis(ml, nlay=2, nrow=10, ncol=10)
    arr = np.ones((ml.nrow, ml.ncol))
    u2d = flopy.utils.Util2d(ml, arr.shape, np.float32, arr, 'test', locat=1)
    print(u2d.get_file_entry())
    u2d.how = 'constant'
    print(u2d.get_file_entry())
    u2d.fmtin = '(binary)'
    print(u2d.get_file_entry())

dataset/ETHPy150Open modflowpy/flopy/autotest/t004_test.py test_how/original