Skip to content

Commit 027689d

Browse files
committed
black update
1 parent 23352bb commit 027689d

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

bindsnet/datasets/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def crop_sample(sample):
151151
opts = {}
152152
image, bb = sample["image"], sample["bb"]
153153
orig_bbox = BoundingBox(bb[0], bb[1], bb[2], bb[3])
154-
(output_image, pad_image_location, edge_spacing_x, edge_spacing_y) = cropPadImage(
154+
output_image, pad_image_location, edge_spacing_x, edge_spacing_y = cropPadImage(
155155
orig_bbox, image
156156
)
157157
new_bbox = BoundingBox(0, 0, 0, 0)

bindsnet/datasets/torchvision_wrapper.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,13 @@ def create_torchvision_dataset_wrapper(ds_type):
1616
ds_type = getattr(torchDB, ds_type)
1717

1818
class TorchvisionDatasetWrapper(ds_type):
19-
__doc__ = (
20-
"""BindsNET torchvision dataset wrapper for:
19+
__doc__ = """BindsNET torchvision dataset wrapper for:
2120
2221
The core difference is the output of __getitem__ is no longer
2322
(image, label) rather a dictionary containing the image, label,
2423
and their encoded versions if encoders were provided.
2524
26-
\n\n"""
27-
+ str(ds_type)
28-
if ds_type.__doc__ is None
29-
else ds_type.__doc__
30-
)
25+
\n\n""" + str(ds_type) if ds_type.__doc__ is None else ds_type.__doc__
3126

3227
def __init__(
3328
self,

bindsnet/learning/learning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ def _conv1d_connection_update(self, **kwargs) -> None:
877877
``AbstractConnection`` class.
878878
"""
879879
# Get convolutional layer parameters.
880-
(out_channels, in_channels, kernel_size) = self.connection.w.size()
880+
out_channels, in_channels, kernel_size = self.connection.w.size()
881881
padding, stride = self.connection.padding, self.connection.stride
882882
batch_size = self.source.batch_size
883883

examples/benchmark/sparse_vs_dense_tensors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from bindsnet.evaluation import all_activity, assign_labels, proportion_weighting
66

7-
87
parser = argparse.ArgumentParser()
98
parser.add_argument("--benchmark_type", choices=["memory", "runtime"], default="memory")
109
args = parser.parse_args()

examples/mnist/MCC_reservoir.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from bindsnet.network.topology import MulticompartmentConnection
2727
from bindsnet.utils import get_square_weights
2828

29-
3029
parser = argparse.ArgumentParser()
3130
parser.add_argument("--seed", type=int, default=0)
3231
parser.add_argument("--n_neurons", type=int, default=500)

0 commit comments

Comments
 (0)