About 55 results
Open links in new tab
  1. Create 3D array using Python - Stack Overflow

    May 20, 2012 · I would like to create a 3D array in Python (2.7) to use like this: distance[i][j][k] And the sizes of the array should be the size of a variable I have.

  2. python - 3-dimensional array in numpy - Stack Overflow

    For C++, creating a non contiguously defined 4D array results in an array [ of arrays [ of arrays [ of elements ]]]. This forces you to de reference the first array that holds all the other arrays (4th …

  3. How to add elements to 3 dimensional array in python

    Interator. I use function lambda for create matrix with [ [ 0 for j in range(n)] for i in range(m) ] in python 3. In the version 2 a used map functions. In this moment think like use array module …

  4. python - How can I iterate through numpy 3d array - Stack Overflow

    Sep 11, 2018 · Reshape the array A (whose shape is n1, n2, 3) to array B (whose shape is n1 * n2, 3), and iterate through B. Note that B is just A's view. A and B share the same data block …

  5. python - Building a 3D array from a number of 2D arrays with …

    Apr 12, 2017 · If you already have one "stacked" array and want to add another array to it, you can use e.g. numpy.concatenate: If the array you want to add is "flat", you would have to wrap …

  6. python - Creating a 3D plot from a 3D numpy array - Stack Overflow

    Sep 13, 2012 · Ok, so I feel like there should be an easy way to create a 3-dimensional scatter plot using matplotlib. I have a 3D numpy array (dset) with 0's where I don't want a point and …

  7. python 3.x - Generate random int in 3D array - Stack Overflow

    Mar 28, 2018 · l would like to generate a random 3d array containing random integers (coordinates) in the intervalle [0,100].

  8. python - Plotting a simple 3d numpy array using matplotlib

    Nov 1, 2016 · import numpy as np v= np.array([[1,2,3], [4,5,6], [7,8,9]]) Where the first value in every 3-tuple is the x coordinate, the second is y coordinate and the third is the z coordinate. I …

  9. numpy with python: convert 3d array to 2d - Stack Overflow

    Sep 29, 2015 · Say that I have a color image, and naturally this will be represented by a 3-dimensional array in python, say of shape (n x m x 3) and call it img. I want a new 2-d array, …

  10. What is the most efficient way to plot 3d array in Python?

    Aug 31, 2017 · What is the most efficient way to plot 3d array in Python? For example: volume = np.random.rand(512, 512, 512) where array items represent grayscale color of each pixel. The …

Refresh