From 567b133347f73f830c1517876d54911266d0645e Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Mon, 30 Apr 2012 08:37:17 +0200 Subject: [PATCH] Correcting copy of an array in example and doc --- doc/examples.rst | 6 +++--- .../Physical_simulation_functions.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 ) -- 2.39.2