Skip to content

Commit 5908d74

Browse files
Assert is a simple statement: no perentheses!
What are you exactly trying to assert here? Whether a tuple is not empty? Whether all iterables are True?
1 parent 715bc6f commit 5908d74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bench/compare-pack-ptr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
dtic = time.time()
7171
out = blosc.unpack_array(c)
7272
dtoc = time.time()
73-
assert((in_ == out).all())
73+
assert ((in_ == out).all())
7474
print(" Time for pack_array/unpack_array: %.3f/%.3f s." % \
7575
(ctoc-ctic, dtoc-dtic), end='')
7676
print("\tCompr ratio: %.2f" % (in_.size*in_.dtype.itemsize*1. / len(c)))
@@ -84,7 +84,7 @@
8484
dtic = time.time()
8585
blosc.decompress_ptr(c, out.__array_interface__['data'][0])
8686
dtoc = time.time()
87-
assert((in_ == out).all())
87+
assert ((in_ == out).all())
8888
print(" Time for compress_ptr/decompress_ptr: %.3f/%.3f s." % \
8989
(ctoc-ctic, dtoc-dtic), end='')
9090
print("\tCompr ratio: %.2f" % (in_.size*in_.dtype.itemsize*1. / len(c)))

bench/compress_ptr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
t0 = time.time()
5555
blosc.decompress_ptr(c, out.__array_interface__['data'][0])
5656
td = time.time() - t0
57-
assert((in_ == out).all())
57+
assert ((in_ == out).all())
5858
print(" *** %-8s, %-10s *** %6.3f s (%.2f GB/s) / %5.3f s (%.2f GB/s)" % (
5959
cname, blosc.filters[shuffle], tc, ((N*8 / tc) / 2**30), td, ((N*8 / td) / 2**30)), end='')
6060
print("\tCompr. ratio: %5.1fx" % (N*8. / len(c)))

0 commit comments

Comments
 (0)