resqpy 4.16.5__py3-none-any.whl → 4.16.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
resqpy/__init__.py CHANGED
@@ -28,6 +28,6 @@
28
28
 
29
29
  import logging
30
30
 
31
- __version__ = "4.16.5" # Set at build time
31
+ __version__ = "4.16.6" # Set at build time
32
32
  log = logging.getLogger(__name__)
33
33
  log.info(f"Imported resqpy version {__version__}")
resqpy/model/_hdf5.py CHANGED
@@ -286,6 +286,14 @@ def _h5_overwrite_array_slice(model, h5_key_pair, slice_tuple, array_slice):
286
286
  dset[slice_tuple] = array_slice
287
287
 
288
288
 
289
+ def _h5_overwrite_array(model, h5_key_pair, array):
290
+ """Overwrites (updates) the whole of an hdf5 array."""
291
+
292
+ h5_root = _h5_access(model, h5_key_pair[0], mode = 'a')
293
+ dset = h5_root[h5_key_pair[1]]
294
+ dset[...] = array
295
+
296
+
289
297
  def h5_clear_filename_cache(model):
290
298
  """Clears the cached filenames associated with all ext uuids."""
291
299
 
resqpy/model/_model.py CHANGED
@@ -1475,6 +1475,21 @@ class Model():
1475
1475
 
1476
1476
  return m_h._h5_overwrite_array_slice(self, h5_key_pair, slice_tuple, array_slice)
1477
1477
 
1478
+ def h5_overwrite_array(self, h5_key_pair, array):
1479
+ """Overwrites (updates) the whole of an hdf5 array.
1480
+
1481
+ arguments:
1482
+ h5_key_pair (uuid, string): the uuid of the hdf5 ext part and the hdf5 internal path to the
1483
+ required hdf5 array
1484
+ array (numpy array of shape to match existing hdf5 dataset): the data to write
1485
+
1486
+ notes:
1487
+ this method naively updates an hdf5 array without using mpi to look after parallel updates;
1488
+ metadata (such as uuid or property min, max values) is not modified in any way by the method
1489
+ """
1490
+
1491
+ return m_h._h5_overwrite_array(self, h5_key_pair, array)
1492
+
1478
1493
  def h5_clear_filename_cache(self):
1479
1494
  """Clears the cached filenames associated with all ext uuids."""
1480
1495
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: resqpy
3
- Version: 4.16.5
3
+ Version: 4.16.6
4
4
  Summary: Python API for working with RESQML models
5
5
  Home-page: https://github.com/bp/resqpy
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- resqpy/__init__.py,sha256=nZA4OZlU88gioRPPaTSnEOUtDFv-7qvPceSeglqSU9o,556
1
+ resqpy/__init__.py,sha256=HShUsMyW_Opst0QwCwfVL9ZeafR-pFfMTCvvDzmU6rU,556
2
2
  resqpy/crs.py,sha256=R7DfcTP5xGv5pu9Y8RHA2WVM9DjBCSVMoHcz4RmQ7Yw,27646
3
3
  resqpy/derived_model/__init__.py,sha256=NFvMSOKI3cxmH7lAbddV43JjoUj-r2G7ExEfOqinD1I,1982
4
4
  resqpy/derived_model/_add_edges_per_column_property_array.py,sha256=cpW3gwp6MSYIrtvFmCjoJXcyUsgGuCDbgmwlJCJebUs,6410
@@ -62,8 +62,8 @@ resqpy/model/_catalogue.py,sha256=duvZlNlTPjAfXyqae0J9lMSEx_8-WIcrw2MYxnNEg_Q,30
62
62
  resqpy/model/_context.py,sha256=0tLBVMcuuIj3i87Ig8lhFMLHE5GHgEA2PEl1NjKaohc,2840
63
63
  resqpy/model/_forestry.py,sha256=QYE3P9uSsh77J6ghcgp2cBQP6UKrs8edF-m05sqgboo,34518
64
64
  resqpy/model/_grids.py,sha256=d7hRQRmni5pJrm1CY31D2icJV1XDar7xTmUexq_eVGY,3371
65
- resqpy/model/_hdf5.py,sha256=2iQdyUp5eNLfWhmvl_XuFO8j7dCdtTBjtrr6-9mq3Qg,14238
66
- resqpy/model/_model.py,sha256=MMiYRrBUitraEg7IeM09PagTP3hZ_e1JJv_C7E6zZX4,105370
65
+ resqpy/model/_hdf5.py,sha256=49Ip2ks7EVt6jT7STqkPNcuk1dE3XrrnlLl5TVEWH84,14469
66
+ resqpy/model/_model.py,sha256=8kBehyWplIi_zYy_TVJY2V0MaVaROfOKAGEBvvrRfxk,106033
67
67
  resqpy/model/_xml.py,sha256=TiZKHZezMdcjRvHSa-HzzrYe9kyDdd8L4hacNV0bjEg,24402
68
68
  resqpy/multi_processing/__init__.py,sha256=ZRudHfN9aaZjxvat7t8BZr6mwMi9baiCNjczwwT0WjI,909
69
69
  resqpy/multi_processing/_multiprocessing.py,sha256=bnCKfSC1tWwvZmZ7BZqCyje0C93m6q7HZPxNpx8xoxA,7301
@@ -194,7 +194,7 @@ resqpy/well/_wellbore_marker_frame.py,sha256=xvYH2_2Ie3a18LReFymbUrZboOx7Rhv5DOD
194
194
  resqpy/well/blocked_well_frame.py,sha256=Lg7TgynfPv9WkklXTLt9VN6uBXWUqX1LI-Xmv_FBqYk,22555
195
195
  resqpy/well/well_object_funcs.py,sha256=LYTcC07ezlBxClfrug_B4iXXZUkXDPgsVufNzp361Wo,24703
196
196
  resqpy/well/well_utils.py,sha256=zwpYjT85nXAwWBhYB1Pygu2SgouZ-44k6hEOnpoMfBI,5969
197
- resqpy-4.16.5.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
198
- resqpy-4.16.5.dist-info/METADATA,sha256=zdLyj409DVsunADWO6B_3G2tBA04jvE4vaLrHD42ZsY,4028
199
- resqpy-4.16.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
200
- resqpy-4.16.5.dist-info/RECORD,,
197
+ resqpy-4.16.6.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
198
+ resqpy-4.16.6.dist-info/METADATA,sha256=nKWccolEPWrZ8qsjWUWMrrbdDSGX1uFvnJOtD7hJySI,4028
199
+ resqpy-4.16.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
200
+ resqpy-4.16.6.dist-info/RECORD,,