22Structural frames
33"""
44import logging
5-
5+ import numpy as np
66logger = logging .getLogger (__name__ )
77
88
@@ -86,7 +86,7 @@ def set_data(self, data):
8686 """
8787 self .data = data
8888
89- def evaluate_value (self , evaluation_points , i = None ):
89+ def evaluate_value (self , evaluation_points ):
9090 """
9191 Evaluate the value of the structural frame for the points.
9292 Can optionally only evaluate one coordinate
@@ -100,11 +100,15 @@ def evaluate_value(self, evaluation_points, i=None):
100100 -------
101101
102102 """
103- if i is not None :
104- self .features [i ].support .evaluate_value (evaluation_points )
105- return (self .features [0 ].support .evaluate_value (evaluation_points ),
106- self .features [1 ].support .evaluate_value (evaluation_points ),
107- self .features [2 ].support .evaluate_value (evaluation_points ))
103+ v = np .zeros (evaluation_points .shape ) #create new 3d array of correct length
104+ v [:] = np .nan
105+ v [:,0 ] = self .features [0 ].evaluate_value (evaluation_points )
106+ v [:,1 ] = self .features [1 ].evaluate_value (evaluation_points )
107+ v [:,2 ] = self .features [2 ].evaluate_value (evaluation_points )
108+ return v
109+ # return (self.features[0].evaluate_value(evaluation_points),
110+ # self.features[1].evaluate_value(evaluation_points),
111+ # self.features[2].evaluate_value(evaluation_points))
108112
109113 def evaluate_gradient (self , evaluation_points , i = None ):
110114 """
0 commit comments