Skip to content

Commit

Permalink
Merge pull request #60 from Iceloof/dev
Browse files Browse the repository at this point in the history
fixed undefined 'np'
  • Loading branch information
HurinHu authored Apr 2, 2021
2 parents c7b85d0 + e194b29 commit 559db9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GoogleNews/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def lexical_date_parser(date_to_check):
if datetime_tmp==None:
date_tmp=date_tmp[1:]
count+=1

if datetime_tmp==None:
date_tmp=date_to_check
else:
Expand Down Expand Up @@ -52,7 +52,7 @@ def define_date(date):
date_list = date.replace(',','').split()[-3:]
return datetime.datetime(day=int(date_list[1]), month=months[month], year=int(date_list[2]))
except:
return float(np.nan)
return float('nan')


### CLASSEs
Expand Down

0 comments on commit 559db9b

Please sign in to comment.