From 80a3e88a3a200816d594babf1354ace47c7e96d6 Mon Sep 17 00:00:00 2001 From: mferrera Date: Fri, 24 Nov 2023 07:54:22 +0100 Subject: [PATCH] DOC: Update deprecated GridProperties examples --- src/xtgeo/grid3d/grid_properties.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/xtgeo/grid3d/grid_properties.py b/src/xtgeo/grid3d/grid_properties.py index 3ddd3ac34..1f1de759e 100644 --- a/src/xtgeo/grid3d/grid_properties.py +++ b/src/xtgeo/grid3d/grid_properties.py @@ -350,8 +350,7 @@ def names(self) -> list[str]: >>> import xtgeo >>> grid = xtgeo.grid_from_file(reek_dir + "/REEK.EGRID") - >>> props = GridProperties() - >>> props.from_file( + >>> props = xtgeo.gridproperties_from_file( ... reek_dir + "/REEK.INIT", ... fformat="init", ... names=["PERMX"], @@ -397,8 +396,7 @@ def props(self) -> list[GridProperty] | None: >>> import xtgeo >>> grid = xtgeo.grid_from_file(reek_dir + "/REEK.EGRID") - >>> myprops = GridProperties() - >>> myprops.from_file( + >>> myprops = xtgeo.gridproperties_from_file( ... reek_dir + "/REEK.INIT", ... fformat="init", ... names=["PERMX"], @@ -443,8 +441,7 @@ def dates(self) -> list[str | None] | None: >>> import xtgeo >>> grid = xtgeo.grid_from_file(reek_dir + "/REEK.EGRID") - >>> props = GridProperties() - >>> props.from_file( + >>> props = xtgeo.gridproperties_from_file( ... reek_dir + "/REEK.INIT", ... fformat="init", ... names=["PERMX"], @@ -584,8 +581,7 @@ def get_actnum( >>> import xtgeo >>> grid = xtgeo.grid_from_file(reek_dir + "/REEK.EGRID") - >>> myprops = GridProperties() - >>> myprops.from_file( + >>> myprops = xtgeo.gridproperties_from_file( ... reek_dir + "/REEK.INIT", ... fformat="init", ... names=["PERMX"], @@ -655,8 +651,7 @@ def from_file( Example:: >>> import xtgeo >>> grid = xtgeo.grid_from_file(reek_dir + "/REEK.EGRID") - >>> props = GridProperties() - >>> props.from_file( + >>> props = xtgeo.gridproperties_from_file( ... reek_dir + "/REEK.INIT", ... fformat="init", ... names=["PERMX"], @@ -716,7 +711,7 @@ def get_dataframe( >>> import xtgeo >>> grid = xtgeo.grid_from_file(reek_dir + "/REEK.EGRID") - >>> pps.grid_properties_from_file( + >>> pps = xtgeo.gridproperties_from_file( ... reek_dir + "/REEK.UNRST", ... fformat="unrst", ... names=['SOIL', 'SWAT', 'PRESSURE'],