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

  • SEARCH
  • Home
  • 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 7938705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:53:04+00:00 2026-06-03T22:53:04+00:00

How to (1) batch select all arrays under a hdf5 file, then (2) apply

  • 0

How to (1) batch select all arrays under a hdf5 file, then (2) apply calculations on those arrays and finally (3) batch create new arrays in another hdf5 file?

for example:

import numpy
import tables

file = openFile('file1',"r")

array1 = file.root.array1
array1_cal = (array1 <= 1)
newfile.createArray('/','array1_cal',array1_cal)

array2 = file.root.array2
array2_cal = (array2 <= 1)
newfile.createArray('/','array2_cal',array2_cal)

I have 100+ arrays under a single hdf5 file and several hdf5 files, how can I batch process them? Thanks a lot.

  • 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-03T22:53:05+00:00Added an answer on June 3, 2026 at 10:53 pm

    With PyTables you can use the walkNodes function to recursively iterate through nodes. Here is an example:

    # Recursively print all the nodes hanging from '/detector'.
    print "Nodes hanging from group '/detector':"
    for node in h5file.walkNodes('/detector', classname='EArray'):
        data = node[:]
        // do some calculation 
        // store new array in second file 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to create a batch or a text file to execute
I have a new batch form where user can select books from a div
My goal is to achieve delete all recommendations and then insert new. (any online
I have a batch file that runs some SELECT queries using sqlcmd, puts the
I have this batch file that outputs a list of all the tables to
Is there anyway to batch two different select queries to either SQLite or SQLCE
I'm trying to execute this: $ mysql --user=XXX --password=XXX --batch --skip-column-names \ -e SELECT
The batch file is something like this, I put the python in some directory
The batch file has only two lines: c:\program.exe ... pause but pause does't run
I created a batch file to run SqlMetal and generate Linq2Sql data classes, check

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.