resqpy 4.18.9__py3-none-any.whl → 4.18.10__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 +1 -1
- resqpy/property/_collection_get_attributes.py +2 -0
- resqpy/property/property_collection.py +29 -4
- {resqpy-4.18.9.dist-info → resqpy-4.18.10.dist-info}/METADATA +1 -1
- {resqpy-4.18.9.dist-info → resqpy-4.18.10.dist-info}/RECORD +7 -7
- {resqpy-4.18.9.dist-info → resqpy-4.18.10.dist-info}/LICENSE +0 -0
- {resqpy-4.18.9.dist-info → resqpy-4.18.10.dist-info}/WHEEL +0 -0
resqpy/__init__.py
CHANGED
@@ -538,6 +538,8 @@ def _supporting_shape_polylineset(support, indexable_element):
|
|
538
538
|
shape_list = [len(support.coordinates) - reduction]
|
539
539
|
elif indexable_element == 'nodes':
|
540
540
|
shape_list = [len(support.coordinates)]
|
541
|
+
elif indexable_element in ['patches', 'enumerated elements', 'contacts']: # one value per polyline within the set
|
542
|
+
shape_list = [len(support.count_perpol)]
|
541
543
|
return shape_list
|
542
544
|
|
543
545
|
|
@@ -141,20 +141,28 @@ class PropertyCollection():
|
|
141
141
|
else:
|
142
142
|
pcs._set_support_uuid_notnone(self, support, support_uuid, model, modify_parts)
|
143
143
|
|
144
|
-
def supporting_shape(self,
|
144
|
+
def supporting_shape(self,
|
145
|
+
indexable_element = None,
|
146
|
+
direction = None,
|
147
|
+
count = 1,
|
148
|
+
points = False,
|
149
|
+
pre_packed = False):
|
145
150
|
"""Return the shape of the supporting representation with respect to the given indexable element
|
146
151
|
|
147
152
|
arguments:
|
148
153
|
indexable_element (string, optional): if None, a hard-coded default depending on the supporting representation class
|
149
154
|
will be used
|
150
155
|
direction (string, optional): must be passed if required for the combination of support class and indexable element;
|
151
|
-
currently only used for Grid faces
|
156
|
+
currently only used for Grid faces
|
157
|
+
count (int, default 1): the count parameter for the property
|
158
|
+
points (bool, default False): set True if the property is a points property
|
159
|
+
pre_packed (bool, default False): set True if the required shape is for a pre-packed boolean property
|
152
160
|
|
153
161
|
returns:
|
154
162
|
list of int, being required shape of numpy array, or None if not coded for
|
155
163
|
|
156
164
|
note:
|
157
|
-
individual property arrays will only match this shape if they have the same indexable element and
|
165
|
+
individual property arrays will only match this shape if they have the same indexable element and matching count etc.
|
158
166
|
"""
|
159
167
|
|
160
168
|
# when at global level was causing circular reference loading issues as grid imports this module
|
@@ -204,6 +212,14 @@ class PropertyCollection():
|
|
204
212
|
else:
|
205
213
|
raise Exception(f'unsupported support class {type(support)} for property')
|
206
214
|
|
215
|
+
if pre_packed:
|
216
|
+
shape_list[-1] = (shape_list[-1] - 1) // 8 + 1
|
217
|
+
|
218
|
+
if shape_list is not None:
|
219
|
+
if count > 1:
|
220
|
+
shape_list.append(count)
|
221
|
+
if points:
|
222
|
+
shape_list.append(3)
|
207
223
|
return shape_list
|
208
224
|
|
209
225
|
def populate_from_property_set(self, property_set_root):
|
@@ -1867,7 +1883,7 @@ class PropertyCollection():
|
|
1867
1883
|
shape = self.supporting_shape(indexable_element = self.indexable_for_part(part),
|
1868
1884
|
direction = pcga._part_direction(self, part))
|
1869
1885
|
assert shape is not None
|
1870
|
-
return shape, (float if self.continuous_for_part(part) else int)
|
1886
|
+
return tuple(shape), (float if self.continuous_for_part(part) else int)
|
1871
1887
|
|
1872
1888
|
h5_key_pair = self._shape_and_type_of_part_get_h5keypair(part, part_node, model)
|
1873
1889
|
if h5_key_pair is None:
|
@@ -2283,6 +2299,15 @@ class PropertyCollection():
|
|
2283
2299
|
uuid = bu.new_uuid()
|
2284
2300
|
cached_name = rqp_c._cache_name_for_uuid(uuid)
|
2285
2301
|
if cached_array is not None:
|
2302
|
+
direction = facet if facet_type == 'direction' else None
|
2303
|
+
shape = self.supporting_shape(indexable_element = indexable_element,
|
2304
|
+
direction = direction,
|
2305
|
+
count = count,
|
2306
|
+
points = points,
|
2307
|
+
pre_packed = pre_packed)
|
2308
|
+
assert shape is not None, f'unsupported indexable element {indexable_element} for supporting representation'
|
2309
|
+
assert cached_array.shape == tuple(
|
2310
|
+
shape), f'property array has shape {cached_array.shape} when expecting {tuple(shape)}'
|
2286
2311
|
min_value, max_value = pcga._min_max_of_cached_array(self, cached_name, cached_array, null_value, discrete)
|
2287
2312
|
else:
|
2288
2313
|
if const_value == null_value or isinstance(const_value, bool) or (not discrete and np.isnan(const_value)):
|
@@ -1,4 +1,4 @@
|
|
1
|
-
resqpy/__init__.py,sha256=
|
1
|
+
resqpy/__init__.py,sha256=bCgJboQVKJh3Tfvdixcjr9IwEMz9vrWU8msVRPmQr6M,557
|
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
|
@@ -130,12 +130,12 @@ resqpy/organize/wellbore_interpretation.py,sha256=jRAHq90tR2dCQSXsZicujXhSVHOEPo
|
|
130
130
|
resqpy/property/__init__.py,sha256=KegXDizklsMB-EnGFrzhCSszrXAHXEIoStdC5XmyifQ,2294
|
131
131
|
resqpy/property/_collection_add_part.py,sha256=uM64TWqJ0aBUwP1u1OJNTUhKLGlmOQj14fGPLG-2pRs,17156
|
132
132
|
resqpy/property/_collection_create_xml.py,sha256=p9GASodhg4vQqDDvCOHScto_Qtz_nDADGtvZY92Dcu8,13001
|
133
|
-
resqpy/property/_collection_get_attributes.py,sha256=
|
133
|
+
resqpy/property/_collection_get_attributes.py,sha256=whWG3O3fIXi2TetUKQWC4JPjrKI9tPrYmw0d51HkJgY,32609
|
134
134
|
resqpy/property/_collection_support.py,sha256=77_DG-0pzhMWdG_mNDiGfihXD7Pp-CvDSGCV8ZlDjj4,5889
|
135
135
|
resqpy/property/_property.py,sha256=JcG7h6k4cJ4l3WC_VCsvoqHM3FBxrnUuxbIK2Ono1M0,24426
|
136
136
|
resqpy/property/attribute_property_set.py,sha256=gATFe-vI00GrgaJNMHSKbM0xmlxIsO5DT1qRSU9snYI,12295
|
137
137
|
resqpy/property/grid_property_collection.py,sha256=37dVQSBSTpX22UfBcpPvwGjd8H3O2MepKpWXYc4yJvM,66858
|
138
|
-
resqpy/property/property_collection.py,sha256=
|
138
|
+
resqpy/property/property_collection.py,sha256=rz_J3-NSyrPOKV2IzC3hqX5Io_oZf-8KLqdeQ0P9YsY,154356
|
139
139
|
resqpy/property/property_common.py,sha256=wf429weNtgf6J4gCNNoRwj64elQvUPI_ZWzg4qI7l6c,35993
|
140
140
|
resqpy/property/property_kind.py,sha256=6SK0La09eisHPYOSgdx69K_Ordrq0x2tz4IAyurVyY8,5557
|
141
141
|
resqpy/property/string_lookup.py,sha256=eH-lbLRbb8JKtO91FTtyuYseRGwPkmsghcXbKUTvVgI,7737
|
@@ -194,7 +194,7 @@ resqpy/well/_wellbore_marker_frame.py,sha256=xvYH2_2Ie3a18LReFymbUrZboOx7Rhv5DOD
|
|
194
194
|
resqpy/well/blocked_well_frame.py,sha256=Rx8jwkCjchseDZaTttPkA1-f6l7W6vRGrxWtDHlEPx8,22560
|
195
195
|
resqpy/well/well_object_funcs.py,sha256=tWufc8wahihzMEO-Ou1dncIttrf4bNo1qmLgh3I2pOM,24717
|
196
196
|
resqpy/well/well_utils.py,sha256=zwpYjT85nXAwWBhYB1Pygu2SgouZ-44k6hEOnpoMfBI,5969
|
197
|
-
resqpy-4.18.
|
198
|
-
resqpy-4.18.
|
199
|
-
resqpy-4.18.
|
200
|
-
resqpy-4.18.
|
197
|
+
resqpy-4.18.10.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
|
198
|
+
resqpy-4.18.10.dist-info/METADATA,sha256=jnRJbRcNGiFk8VVQANkqRuApRa4Y0EQ5I0201HlTRk8,4029
|
199
|
+
resqpy-4.18.10.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
200
|
+
resqpy-4.18.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|