@@ -252,7 +252,7 @@ def set_value_constraints(self, points: np.ndarray):
252252 points = np .hstack ([points , np .ones ((points .shape [0 ], 1 ))])
253253 if points .shape [1 ] < self .dimensions + 2 :
254254 raise ValueError ("Value points must at least have X,Y,Z,val,w" )
255- self .data ["value" ] = points
255+ self .data ["value" ] = points . copy ()
256256 self .n_i = points .shape [0 ]
257257 self .up_to_date = False
258258
@@ -282,7 +282,7 @@ def set_gradient_constraints(self, points: np.ndarray):
282282 if points .shape [1 ] < self .dimensions * 2 + 1 :
283283 raise ValueError ("Gradient constraints must at least have X,Y,Z,gx,gy,gz" )
284284 self .n_g = points .shape [0 ]
285- self .data ["gradient" ] = points
285+ self .data ["gradient" ] = points . copy ()
286286 self .up_to_date = False
287287
288288 def set_normal_constraints (self , points : np .ndarray ):
@@ -308,7 +308,7 @@ def set_normal_constraints(self, points: np.ndarray):
308308 if points .shape [1 ] < self .dimensions * 2 + 1 :
309309 raise ValueError ("Normal constraints must at least have X,Y,Z,nx,ny,nz" )
310310 self .n_n = points .shape [0 ]
311- self .data ["normal" ] = points
311+ self .data ["normal" ] = points . copy ()
312312 self .up_to_date = False
313313
314314 def set_tangent_constraints (self , points : np .ndarray ):
@@ -328,24 +328,24 @@ def set_tangent_constraints(self, points: np.ndarray):
328328 points = np .hstack ([points , np .ones ((points .shape [0 ], 1 ))])
329329 if points .shape [1 ] < self .dimensions * 2 + 1 :
330330 raise ValueError ("Tangent constraints must at least have X,Y,Z,tx,ty,tz" )
331- self .data ["tangent" ] = points
331+ self .data ["tangent" ] = points . copy ()
332332 self .up_to_date = False
333333
334334 def set_interface_constraints (self , points : np .ndarray ):
335- self .data ["interface" ] = points
335+ self .data ["interface" ] = points . copy ()
336336 self .up_to_date = False
337337
338338 def set_value_inequality_constraints (self , points : np .ndarray ):
339339 if points .shape [1 ] < self .dimensions + 2 :
340340 raise ValueError ("Inequality constraints must at least have X,Y,Z,lower,upper" )
341- self .data ["inequality" ] = points
341+ self .data ["inequality" ] = points . copy ()
342342 self .up_to_date = False
343343
344344 def set_inequality_pairs_constraints (self , points : np .ndarray ):
345345 if points .shape [1 ] < self .dimensions + 1 :
346346 raise ValueError ("Inequality pairs constraints must at least have X,Y,Z,rock_id" )
347347
348- self .data ["inequality_pairs" ] = points
348+ self .data ["inequality_pairs" ] = points . copy ()
349349 self .up_to_date = False
350350
351351 def get_value_constraints (self ):
0 commit comments