Skip to content

Commit

Permalink
Update numpy requirement to 2.2 (typing).
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeyer committed Dec 12, 2024
1 parent 201f26c commit 99fd0fc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ requirements:
- python >=3.11
- nionswift >=16.12,<17.0
- nionui >=8.0,<9.0
- numpy >=2.2,<3.0

test:
imports:
Expand Down
2 changes: 1 addition & 1 deletion nion/eels_analysis/eels_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def subtract_linear_background(data_and_metadata: DataAndMetadata.DataAndMetadat
p = stacked_fit_linear_background(data[..., range(*fit_range)], signal_index)
linear = numpy.arange(signal_range[0], signal_range[1])
background = (p[..., 0, numpy.newaxis] * linear[:] + p[..., 1, numpy.newaxis])
result = data[..., range(*signal_range)] - background
result: DataAndMetadata._ImageDataType = data[..., range(*signal_range)] - background

return DataAndMetadata.new_data_and_metadata(result, data_and_metadata.intensity_calibration, data_and_metadata.dimensional_calibrations)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def pick_new_edge(document_controller: DocumentController.DocumentControll
- a background subtraction computation with model data item, and edge intervals as inputs
- a background data item, computed by the background subtraction computation
- a subtracted data item, computed by the background subtraction computation
- a eels line plot with pick, background, and subtracted data items as components
- an eels line plot with pick, background, and subtracted data items as components
- an edge reference, owned by eels line plot, with reference to edge
- the edge reference is used to recognize the eels line plot as associated with the referenced edge
"""
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ classifiers =
packages = find_namespace:
python_requires = >=3.11
install_requires =
nionswift>=16.12,<17.0
nionui>=8.0,<9.0
nionswift >=16.12,<17.0
nionui >=8.0,<9.0
numpy >=2.2,<3.0
tests_require =
nionswift
nionswift-io
numpy>=2.0,<3.0

[options.package_data]
nion.eels_analysis =
Expand Down

0 comments on commit 99fd0fc

Please sign in to comment.