“Contoh fungsi Python Numpy Expand_Dims” Kode Jawaban

Contoh fungsi Python Numpy Expand_Dims

# welcome to softhunt.net
# import numpy
import numpy as np

# using Numpy.expand_dims() function
softhunt = np.array([[1, 2], [7, 8]])
print(softhunt.shape)

softhunt = np.expand_dims(softhunt, axis = 1)
print(softhunt.shape)
Outrageous Ostrich

Contoh fungsi Python Numpy Expand_Dims

# welcome to softhunt.net
# import numpy
import numpy as np

# using Numpy.expand_dims() function
softhunt = np.array([1, 2])
print(softhunt.shape)

softhunt = np.expand_dims(softhunt, axis = 0)
print(softhunt.shape)
Outrageous Ostrich

Jawaban yang mirip dengan “Contoh fungsi Python Numpy Expand_Dims”

Pertanyaan yang mirip dengan “Contoh fungsi Python Numpy Expand_Dims”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya