

def test_util3d():
    ml = flopy.modflow.Modflow()
    u3d = Util3d(ml, (10, 10, 10), np.float32, 10.0, 'test')
    a1 = u3d.array
    a2 = (np.ones((10, 10, 10), dtype=np.float32) * 10.0)
    assert np.array_equal(a1, a1)
    new_3d = (u3d * 2.0)
    assert np.array_equal(new_3d.array, (u3d.array * 2))
    mult = ([2.0] * 10)
    mult_array = (u3d * mult).array
    assert np.array_equal(mult_array, (np.zeros((10, 10, 10)) + 20.0))
    u3d.cnstnt = 2.0
    assert (not np.array_equal(a1, u3d.array))
    return

dataset/ETHPy150Open modflowpy/flopy/autotest/t004_test.py test_util3d/VarMisuse@80/94 `a2`->`a1`