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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:56:30+00:00 2026-06-10T02:56:30+00:00

I am working on a project where I have large input files which come

  • 0

I am working on a project where I have large input files which come from numerical solutions of pdes. The format of the data is as follows.

x \t y \t f(x,y)

For each value of y, we have several values of x, and the function value evaluated at each point. The size of the data I’m dealing with is about [-3, 5]x[-3, 5] in steps of 0.01 in each dimension, so the raw data file is pretty big (about 640,000 entries). Reading it into memory is also pretty time-taking because the tools I’m working on have to read multiple raw data files of this type at the same time.

I’m using Python.

Is there any way to store and read data like this efficiently in Python? The idea is to include a tool that massages these raw data files into something that can be read more efficiently. I’m currently working on interpolating the data and storing some coefficients (essentially replacing memory by computing time), but I’m sure there must be an easier way that helps both memory and time.

Thanks SOCommunity!

PS: I saw related questions in Java. I’m working entirely on Python here.

  • 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-10T02:56:31+00:00Added an answer on June 10, 2026 at 2:56 am

    If you’re using numpy (and you probably should be), numpy.save/numpy.savez and numpy.load should be able to handle this pretty easily.

    For example:

    import numpy as np
    xs = np.linspace(-3, 5, 800)
    ys = np.linspace(-3, 5, 800)
    f_vals = np.random.normal(size=(xs.size, ys.size))
    np.savez('the_file.npz', xs=xs, ys=ys, f=f_vals)
    

    is quite quick, and the resulting file is less than 5mb.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a project where we have a large data warehouse which
I have a large-ish project that I'm working on which uses git as the
I'm working on a large project (for me) which will have many classes and
I am working on a project where I have to download files from server
I am currently working on project where I have to match up a large
I am working on a fairly large project and have recently bumped into the
I have a large project which was originally written in C#1.1 and is now
I am currently working on a project where I have to manage large sets
I'm working on a large web project based on LAMP stack. I have to
I have a large scale project I am working on at the moment using

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.