Skip to content

np.vstack() - Stack arrays vertically #46

@TheWolf313

Description

@TheWolf313

Syntax:
np.vstack((a, b, ...))

Example:
import numpy as np
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
stacked = np.vstack((a, b))

[[1 2 3]
[4 5 6]]

import numpy as np
x = np.array([7, 8, 9])
y = np.array([10, 11, 12])
result = np.vstack((x, y))
print(result)

[[ 7 8 9]
[10 11 12]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions