File: test_hyper.py

package info (click to toggle)
poliastro 0.17.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,136 kB
  • sloc: python: 17,039; makefile: 172
file content (14 lines) | stat: -rw-r--r-- 359 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import numpy as np
import pytest
from numpy.testing import assert_allclose
from scipy import special

from poliastro._math.special import hyp2f1b as hyp2f1


@pytest.mark.parametrize("x", np.linspace(0, 1, num=11))
def test_hyp2f1_battin_scalar(x):
    expected_res = special.hyp2f1(3, 1, 5 / 2, x)

    res = hyp2f1(x)
    assert_allclose(res, expected_res)