提交 492b1398 authored 作者: Frederic Bastien's avatar Frederic Bastien

better error msg.

上级 9c9e190d
...@@ -15,7 +15,7 @@ def sparse_constructor(value, name=None, strict=False, allow_downcast=None, ...@@ -15,7 +15,7 @@ def sparse_constructor(value, name=None, strict=False, allow_downcast=None,
writeme writeme
""" """
if not isinstance(value, scipy.sparse.spmatrix): if not isinstance(value, scipy.sparse.spmatrix):
raise TypeError() raise TypeError("Expected a sparse matrix in the sparse shared variable constructor. Received: ",value.__class__)
if format is None: if format is None:
format = value.format format = value.format
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论