Skip to content

Commit

Permalink
trying to get the tests to work
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimerzp committed Jun 11, 2024
1 parent db3836a commit 4b59eb0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
30 changes: 14 additions & 16 deletions nb/priors_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"dummy = np.load('../src/qp/projectors/tests/dummy.npz')\n",
"dummy = np.load('../tests/qp/dummy.npz')\n",
"zs = dummy['zs']\n",
"pzs = dummy['pzs']\n",
"cov = np.cov(pzs.T)\n",
Expand All @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -79,7 +79,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -91,14 +91,12 @@
}
],
"source": [
"shifts = qp.projectors.projector_shifts.ProjectorShifts(q)\n",
"#shifts = rp.ProjectorShifts(zs, pzs)\n",
"print(len(shifts.z), shifts.pzs.shape)"
"shifts = qp.projectors.ProjectorShifts(q)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -107,7 +105,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -116,7 +114,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -125,7 +123,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -166,7 +164,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand All @@ -181,12 +179,12 @@
}
],
"source": [
"moments = qp.projectors.projector_moments.ProjectorMoments(q)"
"moments = qp.projectors.ProjectorMoments(q)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -195,7 +193,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -204,7 +202,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down
4 changes: 2 additions & 2 deletions tests/qp/test_projector_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def make_qp_ens(file):
def test_base_from_qp():
file = np.load('tests/qp/dummy.npz')
ens = make_qp_ens(file)
projector = proj.ProjectorBase.ProjectorBase(ens)
projector = proj.ProjectorBase(ens)
m, n = projector.pzs.shape
k, = projector.z.shape
pzs = file['pzs']
Expand All @@ -26,7 +26,7 @@ def test_base_from_arrs():
file = np.load('tests/qp/dummy.npz')
zs = file['zs']
pzs = file['pzs']
projector = proj.ProjectorBase.ProjectorBase(zs, pzs)
projector = proj.ProjectorBase(zs, pzs)
m, n = projector.pzs.shape
k, = projector.z.shape
pzs = file['pzs']
Expand Down
2 changes: 1 addition & 1 deletion tests/qp/test_projector_moments.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def make_qp_ens(file):
def make_projector():
file = np.load('tests/qp/dummy.npz')
ens = make_qp_ens(file)
return proj.projector_moments.ProjectorMoments(ens)
return proj.ProjectorMoments(ens)


def test_prior():
Expand Down
2 changes: 1 addition & 1 deletion tests/qp/test_projector_shifts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def make_qp_ens(file):
def make_projector():
file = np.load('tests/qp/dummy.npz')
ens = make_qp_ens(file)
return proj.projector_shifts.ProjectorShifts(ens)
return proj.ProjectorShifts(ens)


def test_prior():
Expand Down

0 comments on commit 4b59eb0

Please sign in to comment.