Skip to content

Commit

Permalink
Bump maximum jaxlib/jax version and resolve some errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Sep 19, 2024
1 parent 0557592 commit 9a48062
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ scipy>=1.6.0
imageio>=2.17
tifffile
matplotlib
jaxlib>=0.4.3,<=0.4.31
jax>=0.4.3,<=0.4.31
jaxlib>=0.4.3,<=0.4.33
jax>=0.4.3,<=0.4.33
orbax-checkpoint<=0.5.7
flax>=0.8.0,<=0.8.3
flax>=0.8.0,<=0.9.0
pyabel>=0.9.0
14 changes: 11 additions & 3 deletions scico/numpy/_blockarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""Block array class."""

import inspect
from functools import wraps
from functools import WRAPPER_ASSIGNMENTS, wraps
from typing import Callable

import jax
Expand Down Expand Up @@ -174,10 +174,18 @@ def prop_ba(self):
def _da_method_wrapper(method_name):
method = getattr(Array, method_name)

if method.__name__ is None:
if method.__name__ is None or method.__qualname__ is None:
return method

@wraps(method)
# Don't try to set attributes that are None. Not clear why some
# functions/methods (e.g. block_until_ready) have None values
# for these attributes.
wrapper_assignments = WRAPPER_ASSIGNMENTS
for attr in ("__name__", "__qualname__"):
if getattr(method, attr) is None:
wrapper_assignments = tuple(x for x in wrapper_assignments if x != attr)

@wraps(method, assigned=wrapper_assignments)
def method_ba(self, *args, **kwargs):
result = tuple(getattr(x, method_name)(*args, **kwargs) for x in self)

Expand Down
4 changes: 2 additions & 2 deletions scico/numpy/_wrapped_function_lists.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2022-2023 by SCICO Developers
# Copyright (C) 2022-2024 by SCICO Developers
# All rights reserved. BSD 3-clause License.
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
Expand Down Expand Up @@ -84,7 +84,7 @@
"arccosh",
"arctanh",
"around",
"round_",
"round",
"rint",
"fix",
"floor",
Expand Down

0 comments on commit 9a48062

Please sign in to comment.