Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pytorch/pytorch
/ view
Method
view
torch/_numpy/_ndarray.py:327–330 ·
view source on GitHub ↗
(self, dtype)
Source
from the content-addressed store, hash-verified
325
b[old_numel:].zero_()
326
327
def
view(self, dtype):
328
torch_dtype = _dtypes.dtype(dtype).torch_dtype
329
tview = self.tensor.view(torch_dtype)
330
return
ndarray(tview)
331
332
@normalizer
333
def
fill(self, value: ArrayLike):
Callers
15
meta_alias
Function · 0.45
_matrix_polynomial_value
Function · 0.45
stft
Function · 0.45
native_group_norm
Function · 0.45
stft
Function · 0.45
istft
Function · 0.45
roll
Function · 0.45
stack
Function · 0.45
unflatten
Function · 0.45
_block_diag_iterable
Function · 0.45
view_as
Function · 0.45
take_along_dim
Function · 0.45
Calls
2
ndarray
Class · 0.85
dtype
Method · 0.45
Tested by
15
test_DistributedDataParallel_SyncBatchNorm_Diff_Input_Sizes_Running_Value
Method · 0.36
_test_rref_proxy_tensor
Method · 0.36
test_rref_proxy_reuse
Method · 0.36
test_transformerencoder_square_input
Method · 0.36
get_a_test_layer
Method · 0.36
test_scaled_dot_product_attention
Method · 0.36
test_sdp_math_gradcheck
Method · 0.36
test_scaled_dot_product_fused_attention_vs_math_cpu
Method · 0.36
convert_flash_attn_S_to_softmax
Method · 0.36
test_mem_eff_attention_non_contig_mask_bug
Method · 0.36
test_scaled_dot_product_attention_fused_kernels_packed
Method · 0.36
test_scaled_dot_product_attention_fused_kernels_packed_accuracy
Method · 0.36