How do I insert a single element into an array on numpy. I know how to insert an entire column or row using the insert and axis parameter. But how do I insert/expand by one.
For example, say I have an array:
1 1 1
1 1 1
1 1 1
How do I insert 0 (on the same row), say on (1, 1) location, say:
1 1 1
1 0 1 1
1 1 1
is this doable? If so, then how do you do the opposite (on the same column), say:
1 1 1
1 0 1
1 1 1
1