Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8560067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:11:37+00:00 2026-06-11T16:11:37+00:00

I have a very basic question regarding to arrays in numpy, but I cannot

  • 0

I have a very basic question regarding to arrays in numpy, but I cannot find a fast way to do it. I have three 2D arrays A,B,C with the same dimensions. I want to convert these in one 3D array (D) where each element is an array

D[column][row] = [A[column][row] B[column][row] c[column][row]] 

What is the best way to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:11:38+00:00Added an answer on June 11, 2026 at 4:11 pm

    You can use numpy.dstack:

    >>> import numpy as np
    >>> a = np.random.random((11, 13))
    >>> b = np.random.random((11, 13))
    >>> c = np.random.random((11, 13))
    >>> 
    >>> d = np.dstack([a,b,c])
    >>> 
    >>> d.shape
    (11, 13, 3)
    >>> 
    >>> a[1,5], b[1,5], c[1,5]
    (0.92522736614222956, 0.64294050918477097, 0.28230222357027068)
    >>> d[1,5]
    array([ 0.92522737,  0.64294051,  0.28230222])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very basic question - but I couldn't find an answer. I have got a
This is a very basic question...quite embarassing, but here goes: I have a Stopwatch
I have a basic question regarding timers. My timer is acting very strange. I
I have very basic question regarding return value of a function, and checking the
I have a very basic question regarding properties in Objective-C. I can only access
I have a very simply question regarding IEquatable. Given the following basic classes: public
I have a very basic question regarding the design of a database. I thought
I'm a perl noob and I have a very basic question regarding the @INC
I have a very, i think basic, question regarding CSS with floating div objects.
I've been reading through stuff on html5 but have a very basic question: what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.