@@ -190,26 +190,14 @@ def get_flat_tri_mask(self, min_circle_ratio=0.01, rescale=True):
190
190
191
191
return np .ma .filled (current_mask , True )
192
192
193
- def _get_compressed_triangulation (self , return_tri_renum = False ,
194
- return_node_renum = False ):
193
+ def _get_compressed_triangulation (self ):
195
194
"""
196
195
Compress (if masked) the encapsulated triangulation.
197
196
198
197
Returns minimal-length triangles array (*compressed_triangles*) and
199
198
coordinates arrays (*compressed_x*, *compressed_y*) that can still
200
199
describe the unmasked triangles of the encapsulated triangulation.
201
200
202
- Parameters
203
- ----------
204
- return_tri_renum : bool, default: False
205
- Indicates whether a renumbering table to translate the triangle
206
- numbers from the encapsulated triangulation numbering into the
207
- new (compressed) renumbering will be returned.
208
- return_node_renum : bool, default: False
209
- Indicates whether a renumbering table to translate the nodes
210
- numbers from the encapsulated triangulation numbering into the
211
- new (compressed) renumbering will be returned.
212
-
213
201
Returns
214
202
-------
215
203
compressed_triangles : array-like
@@ -222,12 +210,11 @@ def _get_compressed_triangulation(self, return_tri_renum=False,
222
210
renumbering table to translate the triangle numbers from the
223
211
encapsulated triangulation into the new (compressed) renumbering.
224
212
-1 for masked triangles (deleted from *compressed_triangles*).
225
- Returned only if *return_tri_renum* is True.
226
213
node_renum : int array
227
214
renumbering table to translate the point numbers from the
228
215
encapsulated triangulation into the new (compressed) renumbering.
229
216
-1 for unused points (i.e. those deleted from *compressed_x* and
230
- *compressed_y*). Returned only if *return_node_renum* is True.
217
+ *compressed_y*).
231
218
232
219
"""
233
220
# Valid triangles and renumbering
@@ -246,20 +233,8 @@ def _get_compressed_triangulation(self, return_tri_renum=False,
246
233
# Now renumbering the valid triangles nodes
247
234
compressed_triangles = node_renum [compressed_triangles ]
248
235
249
- # 4 cases possible for return
250
- if not return_tri_renum :
251
- if not return_node_renum :
252
- return compressed_triangles , compressed_x , compressed_y
253
- else :
254
- return (compressed_triangles , compressed_x , compressed_y ,
255
- node_renum )
256
- else :
257
- if not return_node_renum :
258
- return (compressed_triangles , compressed_x , compressed_y ,
259
- tri_renum )
260
- else :
261
- return (compressed_triangles , compressed_x , compressed_y ,
262
- tri_renum , node_renum )
236
+ return (compressed_triangles , compressed_x , compressed_y , tri_renum ,
237
+ node_renum )
263
238
264
239
@staticmethod
265
240
def _total_to_compress_renum (mask , n = None ):
0 commit comments