Revision 75dffd7fc5e81e8f3711f024e48270550dbf149f authored by Nishant Panchal on 07 December 2022, 16:55:06 UTC, committed by GitHub on 07 December 2022, 16:55:06 UTC
Using .item() to get the value in the tensor that is returned by .std().
This should fix the issue where the type of the std calculation is not
an int or float.

Signed-off-by: Nishant Panchal
<68797723+Nishantppanchal@users.noreply.github.com>

Fixes #5674 .

### Description

When we use .std() on a tensor, a tensor with the standard deviation
inside is returned. To get this standard deviation, we also have to use
.item(). However, this was not done, so I fixed it.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [x] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.

Signed-off-by: Nishant Panchal <68797723+Nishantppanchal@users.noreply.github.com>
1 parent 7bebb6b
History
File Mode Size
.github
docs
monai
tests
.clang-format -rw-r--r-- 2.5 KB
.deepsource.toml -rw-r--r-- 349 bytes
.dockerignore -rw-r--r-- 160 bytes
.gitattributes -rw-r--r-- 31 bytes
.gitignore -rw-r--r-- 1.8 KB
.pre-commit-config.yaml -rw-r--r-- 2.2 KB
.readthedocs.yml -rw-r--r-- 628 bytes
CHANGELOG.md -rw-r--r-- 34.7 KB
CITATION.cff -rw-r--r-- 3.8 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.3 KB
CONTRIBUTING.md -rw-r--r-- 22.6 KB
Dockerfile -rw-r--r-- 2.4 KB
LICENSE -rw-r--r-- 11.1 KB
MANIFEST.in -rw-r--r-- 83 bytes
README.md -rw-r--r-- 4.1 KB
environment-dev.yml -rw-r--r-- 206 bytes
pyproject.toml -rw-r--r-- 570 bytes
requirements-dev.txt -rw-r--r-- 1.0 KB
requirements-min.txt -rw-r--r-- 118 bytes
requirements.txt -rw-r--r-- 23 bytes
runtests.sh -rwxr-xr-x 20.1 KB
setup.cfg -rw-r--r-- 5.6 KB
setup.py -rw-r--r-- 5.0 KB
versioneer.py -rw-r--r-- 79.2 KB

README.md

back to top