From: Jean-Philippe ARGAUD Date: Mon, 30 Apr 2012 06:37:17 +0000 (+0200) Subject: Correcting copy of an array in example and doc X-Git-Tag: V6_5_0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=567b133347f73f830c1517876d54911266d0645e;p=modules%2Fadao.git Correcting copy of an array in example and doc --- diff --git a/doc/examples.rst b/doc/examples.rst index 8e937d8..a79705c 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -460,9 +460,9 @@ here for convenience:: # Jacobian = [] for i in range( len(dX) ): - X_plus_dXi = X.A1 + X_plus_dXi = numpy.array( X.A1 ) X_plus_dXi[i] = X[i] + dX[i] - X_moins_dXi = X.A1 + X_moins_dXi = numpy.array( X.A1 ) X_moins_dXi[i] = X[i] - dX[i] # HX_plus_dXi = FunctionH( X_plus_dXi ) @@ -476,7 +476,7 @@ here for convenience:: # HX_plus_dX = [] for i in range( len(dX) ): - X_plus_dXi = X.A1 + X_plus_dXi = numpy.array( X.A1 ) X_plus_dXi[i] = X[i] + dX[i] # HX_plus_dXi = FunctionH( X_plus_dXi ) diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py b/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py index e83bbf6..0aa4010 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py @@ -89,9 +89,9 @@ def TangentH( X, increment = 0.01, centeredDF = False ): # ---------------------------------------------- Jacobienne = [] for i in range( len(dX) ): - X_plus_dXi = X.A1 + X_plus_dXi = numpy.array( X.A1 ) X_plus_dXi[i] = X[i] + dX[i] - X_moins_dXi = X.A1 + X_moins_dXi = numpy.array( X.A1 ) X_moins_dXi[i] = X[i] - dX[i] # HX_plus_dXi = FunctionH( X_plus_dXi ) @@ -107,7 +107,7 @@ def TangentH( X, increment = 0.01, centeredDF = False ): # ---------------------------------------------- HX_plus_dX = [] for i in range( len(dX) ): - X_plus_dXi = X.A1 + X_plus_dXi = numpy.array( X.A1 ) X_plus_dXi[i] = X[i] + dX[i] # HX_plus_dXi = FunctionH( X_plus_dXi )