Skip to content

Commit

Permalink
style: style fixes by ruff and autoformatting by black
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose authored and github-actions[bot] committed Jan 12, 2025
1 parent 3fa75a4 commit 628e6d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions LoopStructural/modelling/features/_projected_vector_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(
Create a geological feature by projecting a vector onto a feature representing a plane
E.g. project a thickness vector onto an axial surface
Parameters
----------
name: feature name
Expand All @@ -42,7 +42,7 @@ def __init__(
super().__init__(name)
self.plane_feature = plane_feature
self.vector = vector

self.value_feature = None

def evaluate_gradient(self, locations: np.ndarray, ignore_regions=False) -> np.ndarray:
Expand All @@ -60,10 +60,10 @@ def evaluate_gradient(self, locations: np.ndarray, ignore_regions=False) -> np.n
-------
"""

# project s0 onto axis plane B X A X B
plane_normal = self.plane_feature.evaluate_gradient(locations, ignore_regions)
vector = np.tile(self.vector,(locations.shape[0],1))
vector = np.tile(self.vector, (locations.shape[0], 1))

projected_vector = np.cross(
plane_normal, np.cross(vector, plane_normal, axisa=1, axisb=1), axisa=1, axisb=1
Expand Down Expand Up @@ -108,5 +108,5 @@ def copy(self, name: Optional[str] = None):
if name is None:
name = f'{self.name}_copy'
return ProjectedVectorFeature(
name=name, vector = self.vector, plane_feature=self.plane_feature
name=name, vector=self.vector, plane_feature=self.plane_feature
)

0 comments on commit 628e6d8

Please sign in to comment.