N
N
nazandr2016-12-12 16:27:50
Python
nazandr, 2016-12-12 16:27:50

How to add vector to numpy array?

for example there is an array

array()

how to add another vector to it, so
array()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andy_U, 2016-12-12
@Andy_U

# -*- coding: utf-8 -*-

import numpy

a = numpy.array()

b = numpy.insert(a, 1, numpy.array([1, 2]), 0)
print(b)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question