提交 2ef1058b authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #1613 from nouiz/crash_fixes

Crash fixes
......@@ -3,7 +3,7 @@
language: python
python:
- "2.5"
- "2.6"
# - "2.7"
# - "3.2"
# command to install dependencies
......
差异被折叠。
from itertools import izip
import theano
import numpy
import scipy
import theano
from theano import gof, scalar, tensor
from theano.tensor import blas
from theano.sparse import (CSC, CSR, csm_properties,
......
......@@ -631,21 +631,21 @@ class Subtensor(Op):
if view_ndim:
rval = """
// Argument of the view
ssize_t xview_dims[%(view_ndim)s];
ssize_t xview_strides[%(view_ndim)s];
npy_intp xview_dims[%(view_ndim)s];
npy_intp xview_strides[%(view_ndim)s];
"""% locals()
else:
rval = """
// Argument of the view
ssize_t* xview_dims = NULL;
ssize_t* xview_strides = NULL;
npy_intp* xview_dims = NULL;
npy_intp* xview_strides = NULL;
"""
rval += """
// One more argument of the view
ssize_t xview_offset = 0;
npy_intp xview_offset = 0;
// The subtensor is created by iterating over the dimensions
// and updating stride, shape, and data pointers
......@@ -776,7 +776,7 @@ class Subtensor(Op):
@staticmethod
def helper_c_code_cache_version():
return (7,)
return (8,)
def c_code(self, node, name, inputs, outputs, sub): # DEBUG
if not isinstance(node.inputs[0].type, theano.tensor.TensorType):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论