# Should it really be necessary to do var.detach().cpu().numpy()?

**URL:** <https://discuss.pytorch.org/t/should-it-really-be-necessary-to-do-var-detach-cpu-numpy/35489>\
**Category:** autograd\
**Created:** [January 24, 2019, 11:29am UTC](https://discuss.pytorch.org/t/should-it-really-be-necessary-to-do-var-detach-cpu-numpy/35489 "2019-01-24T11:29:42Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![petered](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/p/6a8cbe/32.png) [@petered](https://discuss.pytorch.org/u/petered)\
**Post date:** [July 8, 2019, 6:02pm UTC](https://discuss.pytorch.org/t/should-it-really-be-necessary-to-do-var-detach-cpu-numpy/35489/5 "2019-07-08T18:02:14Z")

</div>

Fair enough - but could we at least get rid of the need for `X.cpu().numpy()`? Seems `X.numpy()` alone should be enough.

---

_[View the full topic](https://discuss.pytorch.org/t/should-it-really-be-necessary-to-do-var-detach-cpu-numpy/35489)._
