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 2018/03/30 00:01:26 UTC

[GitHub] sergeykolychev commented on a change in pull request #10208: [MXNET-117] Sparse operator broadcast_mul/div(csr, dense) = csr

sergeykolychev commented on a change in pull request #10208: [MXNET-117] Sparse operator broadcast_mul/div(csr, dense) = csr
URL: https://github.com/apache/incubator-mxnet/pull/10208#discussion_r178209975
 
 

 ##########
 File path: perl-package/AI-MXNet/lib/AI/MXNet/NDArray/Sparse.pm
 ##########
 @@ -80,10 +80,100 @@ use overload '""' => sub {
                         my $shape_info = join('x', @{ $self->shape });
                         sprintf("\n<%s, %s @%s>", $self->_class_name, $shape_info, $self->context);
                      },
+             '+'  => \&add,
+             '-'  => \&subtract,
+             '*'  => \&multiply,
+             '/'  => \&divide,
              '+=' => \&not_implemented,
              '-=' => \&not_implemented,
              '*=' => \&not_implemented,
              '/=' => \&not_implemented;
+
+method add(AI::MXNet::NDArray|Num $other, $reverse=)
+{
 
 Review comment:
   Yeah, I'll next time. Tried to unblock quickly. Though I don't see anybody using the functions directly and not via the overloaded operators.

----------------------------------------------------------------
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