Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

NDArray invocations with scalar arguments. #4844

Closed
jermainewang opened this issue Feb 1, 2017 · 2 comments
Closed

NDArray invocations with scalar arguments. #4844

jermainewang opened this issue Feb 1, 2017 · 2 comments

Comments

@jermainewang
Copy link
Contributor

There are many complaints about passing scalar arguments to MXNet's ndarray calls (dmlc/minpy#139, dmlc/minpy#134). What I am thinking about is to have a wrapper for every registered NDArray function in MXNet such that if the given argument is scalar but supposed to be array, do an automatic conversion. My question is should we do it on python side? or on C++ side?

  • If done on python side, each ndarray call will have an extra wrapper (another function redirect), which may introduce overhead.
  • I don't know whether this is supported on C++ side, since I guess C++ cannot have arguments of either NDArray or scalar type?

@piiswrong @hotpxl @lryta

@piiswrong
Copy link
Contributor

calls like sqrt(2) isn't worth a call to backend. It should be handle in frontend

@phunterlau
Copy link
Contributor

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants