Skip to content

Commit

Permalink
v0.6.0 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dprohe committed Feb 6, 2023
1 parent b05947f commit 3685ece
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ the general equation

.. math::
\mathbf{H}^+ = \left(\mathbf{H}^T\mathbf{W}^T\mathbf{W}\mathbf{H}+\lambda\mathbf{\Sigma}\right)^{-1}\mathbf{H}^T\mathbf{W}^T
\mathbf{H}^+ = \left(\mathbf{H}^H\mathbf{W}^H\mathbf{W}\mathbf{H}+\lambda\mathbf{\Sigma}\right)^{-1}\mathbf{H}^H\mathbf{W}^H\mathbf{W}
where :math:`\mathbf{H}` is the frequency response function matrix,
:math:`\mathbf{W}` is a response weighting matrix, :math:`\lambda` is the input
Expand Down
8 changes: 6 additions & 2 deletions tests/geometry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
def cartesian_geometry():
coordinates = np.linspace(-1,1,5)
all_coords = np.array(np.meshgrid(coordinates,coordinates,coordinates,indexing='ij')).reshape(3,-1).T
# Scale so they are different lengths
all_coords *= np.array((1.1,1.0,0.9))
node_ids = np.arange(all_coords.shape[0])+1
rotation = sdpy.rotation.R(2,20,degrees=True)@sdpy.rotation.R(1,-30,degrees=True)@sdpy.rotation.R(0,-45,degrees=True)
translation = np.array(((0.0,2.0,1.0),))
Expand Down Expand Up @@ -98,6 +96,12 @@ def test_node_indexing(cartesian_geometry):
scalar_node = cartesian_geometry.node(scalar_id)
check_nodes = cartesian_geometry.node[indices]
check_scalar_node = cartesian_geometry.node[scalar_index]
nodes_by_reduction = cartesian_geometry.node.reduce(ids)
scalar_node_by_reduction = cartesian_geometry.node.reduce(scalar_id)
assert np.all(nodes == check_nodes)
assert np.all(check_scalar_node == scalar_node)
assert np.all(nodes_by_reduction == check_nodes)
assert np.all(check_scalar_node == scalar_node_by_reduction)
with pytest.raises(ValueError):
cartesian_geometry.node(1000)

0 comments on commit 3685ece

Please sign in to comment.