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 634525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:18:19+00:00 2026-05-13T20:18:19+00:00

Surely there must be a way to do this… I can’t work it out.

  • 0

Surely there must be a way to do this… I can’t work it out.

I have a (9,4) array, and I want to repeat it along a 3rd axis 4096 times… So it becomes simply (9,4,4096), with each value from the 9,4 array simply repeated 4096 times down the new axis.

If my dubious 3D diagram makes sense (the diagonal is a z-axis)

4|   /off to 4096
3|  /
2| /
1|/_ _ _ _ _ _ _ _ _ 
   1 2 3 4 5 6 7 8 9

Cheers

EDIT: Just to clarify, the emphasis here is on the (9,4) array being REPEATED for each of the 4096 ‘rows’ of the new axis. Imagine a cross-section – each original (9,4) array is one of those down the 4096 long cuboid.

  • 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-05-13T20:18:19+00:00Added an answer on May 13, 2026 at 8:18 pm

    Here is one way:

    import scipy
    X = scipy.rand(9,4,1)
    Y = X.repeat(4096,2)
    

    If X is given to you as only (9,4), then

    import scipy
    X = scipy.rand(9,4)
    Y = X.reshape(9,4,1).repeat(4096,2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Surely there must be a way to do this easily! I've tried the Linux
Surely there is a better way to do this? results = [] if not
Surely there is a way to store a date value prior than 1-1-1900 in
Surely there is some kind of abstraction that allows for this? This is essentially
I can't seem to find that option. Surely it's in there?
Surely this is possible? I have been hunting through PyQt tutorials and documentation but
There must be a simple solution out there, I'm trying to use NHibernate Validator
Following the directions at this question , I have some code running to extract
While filling out secure forms on bank websites, I have always wondered how they
I have a 2d numpy array of bools, and I'd like to know how

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.