pdme/tests/subspace_simulation/test_sort_dipoles.py
Deepak Mallubhotla f280448cfe
All checks were successful
gitea-physics/pdme/pipeline/head This commit looks good
gitea-physics/pdme/pipeline/pr-master This commit looks good
feat: adds a bunch of mcmc generation code for log spaced models, yay
2023-07-23 17:38:05 -05:00

16 lines
352 B
Python

import numpy
import pdme.subspace_simulation
def test_sort_dipoles_by_freq(snapshot):
orig = numpy.array(
[
[1, 2, 3, 4, 5, 6, 7],
[100, 200, 300, 400, 500, 600, 0.07],
[10, 200, 30, 41, 315, 0.31, 100],
]
)
actual_sorted = pdme.subspace_simulation.sort_array_of_dipoles_by_frequency(orig)
assert actual_sorted.tolist() == snapshot