Skip to content

Commit

Permalink
Handle CodeFactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-T-McCann committed Apr 14, 2022
1 parent c2fe8ad commit ea6dbfb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion scico/numpy/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def mapped(*args, **kwargs):
if isinstance(v, BlockArray):
ba_args[k] = bound_args.arguments.pop(k)

if not len(ba_args): # no BlockArray arguments
if not ba_args: # no BlockArray arguments
return func(*args, **kwargs) # no mapping

num_blocks = len(list(ba_args.values())[0])
Expand Down
11 changes: 1 addition & 10 deletions scico/numpy/blockarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@
TODO: working with SCICO operators
TODO: indexing
TODO: -x doesn't work
Motivating Example
==================
Expand Down Expand Up @@ -517,8 +510,6 @@

from .function_lists import binary_ops, unary_ops

# CANCELED: .sum(), etc. should call snp


class BlockArray(list):
"""BlockArray"""
Expand Down Expand Up @@ -553,7 +544,7 @@ def _full_ravel(self) -> DeviceArray:
@property
def dtype(self):
"""Allow snp.zeros(x.shape, x.dtype) to work."""
return self[0].dtype # TODO: a better solution is beyond current scope
return self[0].dtype

def __getitem__(self, key):
"""Make, e.g., x[:2] return a BlockArray, not a list."""
Expand Down
2 changes: 1 addition & 1 deletion scico/ray/tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import ray.tune
except ImportError:
raise ImportError("Could not import ray.tune; please install it.")
from ray.tune import loguniform, report, uniform # noqa
from ray.tune import grid_search, loguniform, report, uniform # noqa
from ray.tune.progress_reporter import TuneReporterBase, _get_trials_by_state
from ray.tune.schedulers import AsyncHyperBandScheduler
from ray.tune.suggest.hyperopt import HyperOptSearch
Expand Down

0 comments on commit ea6dbfb

Please sign in to comment.