You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/11/26 07:58:35 UTC
[GitHub] weixingzhang commented on issue #8817: Creating a monodimensional sparse array returns an error
weixingzhang commented on issue #8817: Creating a monodimensional sparse array returns an error
URL: https://github.com/apache/incubator-mxnet/issues/8817#issuecomment-346991137
CSR or row_sparse is for matrix. Thus, the implementation is expecting that
shape is a list rather than an integer.
The code below should work.
b1 = mx.nd.sparse.zeros('csr',shape=[10,1], ctx=ctx)
On Sat, Nov 25, 2017 at 9:23 PM, marfago <no...@github.com> wrote:
> However, I tried also with
> b1 = nd.zeros(shape=10, ctx=ctx, stype='row_sparse')
> and I got the same error.
>
> What is the way to build a sparse vector?
>
> ?
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/incubator-mxnet/issues/8817#issuecomment-346985361>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AToL4W0VxlQq84UTzN60QDAIRiCN2bwrks5s6PXhgaJpZM4Qqixl>
> .
>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services