Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Count Nonzero.json #123

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JessicaSun1022
Copy link
Contributor

No description provided.

@sauravpandey123
Copy link
Contributor

Good Attempt!
But your function does not work if no dim is specified. For instance, if I have a 2x2 matrix
[[1,2], [3,4]], the function should simply return 4 if no dim is specified, but yours returns [2,2].
Refer to the PyTorch function here.
Also, there is a small place where your design could improve --> inside the False block

image

@JessicaSun1022
Copy link
Contributor Author

I tested out the specified example and I am getting the value 4. If no dimension is specified, the function requires the user to input 'none' into the dimension input. Please let me know if I am missing something.
Screenshot 2024-07-31 185302

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

Successfully merging this pull request may close these issues.

2 participants