Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def construct_floatKW(name, values):
kw = EclKW(name, len(values), EclDataType.ECL_FLOAT)
for i, value in enumerate(values):
kw[i] = value
return kw
def construct_floatKW(name, values):
kw = EclKW(name, len(values), EclDataType.ECL_FLOAT)
for i in range(len(values)):
kw[i] = values[i]
return kw
new_nx, new_ny, new_nz = ux-lx+1, uy-ly+1, uz-lz+1
cls.assert_actnum(nx, ny, nz, actnum)
actnum = divide(divide(actnum, nx), ny)
new_actnum = [
y_slice[lx:ux+1:]
for z_slice in actnum[lz:uz+1:]
for y_slice in z_slice[ly:uy+1:]
]
new_actnum = flatten(new_actnum)
cls.assert_actnum(new_nx, new_ny, new_nz, new_actnum)
actnumkw = EclKW("ACTNUM", len(new_actnum), EclDataType.ECL_INT)
for i, value in enumerate(new_actnum):
actnumkw[i] = value
return actnumkw