Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix var of int input - #18150

Merged
chenyuxyz merged 1 commit into
tinygrad:masterfrom
teddytennant:hg-var
Sep 12, 2026
Merged

fix var of int input#18150
chenyuxyz merged 1 commit into
tinygrad:masterfrom
teddytennant:hg-var

Conversation

@teddytennant

Copy link
Copy Markdown
Contributor

Since #17444 var casts the float squared deviations to the int accumulator of the input dtype, so Tensor([1,2]).var() is 0. test_var only used float input.

@github-actions

Copy link
Copy Markdown
Contributor

Changes

Name                    Lines    Diff    Tokens/Line    Diff
--------------------  -------  ------  -------------  ------
tinygrad/mixin/op.py      752      +0           23.5    -0.0


total lines changes: 0

@chenyuxyz
chenyuxyz merged commit 34eabf6 into tinygrad:master Sep 12, 2026
51 checks passed
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