提交 061548c0 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Typo fixes

上级 07bf16ce
......@@ -366,8 +366,8 @@ def constant_or_value(x, rtype, name=None, ndim=None, dtype=None):
# Theano graph, because on Windows 64, all shapes are expressed
# with longs.
# If a long fits in int64, we convert it into an int64, like
# numpy.asarray() does up to 1.7. NumPy 1.7.1 upcaset to int64
# if possible, but fallback to uint64 if int64 isn't possible but
# numpy.asarray() does up to 1.7. NumPy 1.7.1 upcasts to int64
# if possible, but falls back to uint64 if int64 isn't possible but
# uint64 is. We always do as NumPy 1.7.1 here.
# If x is too big, an OverflowError will be raised by numpy.
try:
......@@ -382,10 +382,10 @@ def constant_or_value(x, rtype, name=None, ndim=None, dtype=None):
if x.dtype == 'bool':
x_ = numpy.asarray(x_, dtype='uint8')
else:
# Here x is probably a list or a tuple. If it contain a long,
# we will behave like the current NumPy version: 1.7 and bellow,
# it will only work if the long fit in int64. For NumPy 1.7.1+,
# it will work if the long git in int64 or uint64.
# Here x is probably a list or a tuple. If it contains a long,
# we will behave like the current NumPy version: 1.7 and below,
# it will only work if the long fits in int64. For NumPy 1.7.1+,
# it will work if the long fits in int64 or uint64.
x_ = numpy.asarray(x)
assert type(x_) == numpy.ndarray
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论