提交 f18302f1 authored 作者: amrithasuresh's avatar amrithasuresh

Updated numpy as np

上级 5f0aec41
......@@ -45,7 +45,7 @@ __contact__ = "Razvan Pascanu <r.pascanu@gmail>"
import logging
import numpy
import numpy as np
import warnings
from collections import OrderedDict
......@@ -488,8 +488,8 @@ def scan(fn,
# a sequence, though is highly unlikely in practice
if 'taps' in seq:
# go through the indicated slice
mintap = numpy.min(seq['taps'])
maxtap = numpy.max(seq['taps'])
mintap = np.min(seq['taps'])
maxtap = np.max(seq['taps'])
for k in seq['taps']:
# create one slice of the input
# Later on, if we decide not to use scan because we are
......@@ -670,15 +670,15 @@ def scan(fn,
elif init_out.get('taps', None):
if numpy.any(numpy.array(init_out.get('taps', [])) > 0):
if np.any(np.array(init_out.get('taps', [])) > 0):
# Make sure we do not have requests for future values of a
# sequence we can not provide such values
raise ValueError('Can not use future taps of outputs',
init_out)
# go through the taps
mintap = abs(numpy.min(init_out['taps']))
mintap = abs(np.min(init_out['taps']))
mit_sot_tap_array.append(init_out['taps'])
idx_offset = abs(numpy.min(init_out['taps']))
idx_offset = abs(np.min(init_out['taps']))
# Sequence
mit_sot_scan_inputs.append(
scan_utils.expand_empty(init_out['initial'][:mintap],
......@@ -725,9 +725,9 @@ def scan(fn,
# a map); in that case we do not have to do anything ..
# Re-order args
max_mit_sot = numpy.max([-1] + mit_sot_rightOrder) + 1
max_sit_sot = numpy.max([-1] + sit_sot_rightOrder) + 1
n_elems = numpy.max([max_mit_sot, max_sit_sot])
max_mit_sot = np.max([-1] + mit_sot_rightOrder) + 1
max_sit_sot = np.max([-1] + sit_sot_rightOrder) + 1
n_elems = np.max([max_mit_sot, max_sit_sot])
_ordered_args = [[] for x in xrange(n_elems)]
offset = 0
for idx in xrange(n_mit_sot):
......@@ -1101,7 +1101,7 @@ def scan(fn,
return out_ls
offset = n_mit_mot
offsets = [abs(numpy.min(x)) for x in mit_sot_tap_array]
offsets = [abs(np.min(x)) for x in mit_sot_tap_array]
mit_sot_outs = remove_dimensions(
scan_outs[offset:offset + n_mit_sot],
mit_sot_return_steps,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论