Commit d62d3c0b authored by Jeremy Howard's avatar Jeremy Howard Committed by Soumith Chintala
Browse files

Bug fix: ff top_db is None then can not check `top_db>0` (#75)

* Bug fix: ff top_db is None then can not check `top_db>0`

* fix formatting
parent a14c2992
......@@ -271,7 +271,9 @@ class SPEC2DB(object):
"""
def __init__(self, stype="power", top_db=None):
self.stype = stype
self.top_db = -top_db if top_db > 0 else top_db
if top_db is not None and top_db > 0:
top_db = -top_db
self.top_db = top_db
self.multiplier = 10. if stype == "power" else 20.
def __call__(self, spec):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment