18
18
import yaml
19
19
20
20
from matplotlib import pyplot
21
- from nptyping import Float
22
- from nptyping import NDArray
23
- from nptyping import Shape
21
+ from numpy .typing import NDArray
24
22
from spectrafit .api .pptx_model import PPTXBasicTitleAPI
25
23
from spectrafit .plugins .data_converter import DataConverter
26
24
from spectrafit .plugins .file_converter import FileConverter
@@ -403,7 +401,7 @@ def test_cmd_data_converter_nor_to_csv(
403
401
404
402
405
403
@pytest .fixture (scope = "function" , autouse = True , name = "tmp_file_dict" )
406
- def tmp_file_dict () -> Dict [str , Dict [str , NDArray [Shape [ "200" ], Float ]]]:
404
+ def tmp_file_dict () -> Dict [str , Dict [str , NDArray [Any ]]]:
407
405
"""Create temporary file with pickle data."""
408
406
return {
409
407
"level_1" : {
@@ -444,7 +442,7 @@ def tmp_file_nested_dict() -> Dict[str, Dict[str, Any]]:
444
442
445
443
@pytest .fixture (scope = "function" , autouse = True , name = "tmp_pkl_gz_file" )
446
444
def tmp_pkl_gz_file (
447
- tmp_path : Path , tmp_file_dict : Dict [str , Dict [str , NDArray [Shape [ "200" ], Float ]]]
445
+ tmp_path : Path , tmp_file_dict : Dict [str , Dict [str , NDArray [np . float64 ]]]
448
446
) -> Path :
449
447
"""Create temporary file with pickle data.
450
448
@@ -462,7 +460,7 @@ def tmp_pkl_gz_file(
462
460
463
461
@pytest .fixture (scope = "function" , autouse = True , name = "tmp_file_pkl" )
464
462
def tmp_file_pkl (
465
- tmp_path : Path , tmp_file_dict : Dict [str , Dict [str , NDArray [Shape [ "200" ], Float ]]]
463
+ tmp_path : Path , tmp_file_dict : Dict [str , Dict [str , NDArray [np . float64 ]]]
466
464
) -> Path :
467
465
"""Create temporary file with pickle data.
468
466
@@ -480,7 +478,7 @@ def tmp_file_pkl(
480
478
481
479
@pytest .fixture (scope = "function" , autouse = True , name = "tmp_file_pkl_gz" )
482
480
def tmp_file_pkl_gz (
483
- tmp_path : Path , tmp_file_dict : Dict [str , Dict [str , NDArray [Shape [ "200" ], Float ]]]
481
+ tmp_path : Path , tmp_file_dict : Dict [str , Dict [str , NDArray [np . float64 ]]]
484
482
) -> Path :
485
483
"""Create temporary file with pickle data.
486
484
@@ -524,7 +522,7 @@ class TestPklConverter:
524
522
def test_export_data (
525
523
self ,
526
524
tmp_path : Path ,
527
- tmp_file_dict : Dict [str , Dict [str , NDArray [Shape [ "200" ], Float ]]],
525
+ tmp_file_dict : Dict [str , Dict [str , NDArray [np . float64 ]]],
528
526
export_format : str ,
529
527
) -> None :
530
528
"""Test export data.
@@ -564,8 +562,7 @@ def test_export_data(
564
562
assert isinstance (data .get ("data" ), np .ndarray )
565
563
566
564
def test_numpy2list (
567
- self ,
568
- tmp_file_dict : Dict [str , Dict [str , NDArray [Shape ["200" ], Float ]]],
565
+ self , tmp_file_dict : Dict [str , Dict [str , NDArray [np .float64 ]]]
569
566
) -> None :
570
567
"""Test numpy2list.
571
568
0 commit comments