Skip to content

Fix normal loc scale shape - #4730

Open
michalk8 wants to merge 2 commits into
ml-explore:mainfrom
michalk8:fix-normal-loc-scale-shape
Open

michalk8 wants to merge 2 commits into
ml-explore:mainfrom
michalk8:fix-normal-loc-scale-shape

Conversation

@michalk8

Copy link
Copy Markdown
Collaborator
  • ☑️ I understand it is strictly prohibited to use AI to write PR description
  • AI usage disclosure: Fix + test

Fixes the case below - loc/scale/shape cannot broadcast, but silently repeats the values:

import mlx.core as mx
 
mx.random.seed(0)
x = mx.random.normal(shape=(3,), loc=mx.zeros((2, 3)))
# has shape (2, 3), rows are the same
print(x)

This branch has not been deployed

No deployments
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.

1 participant