Linked Questions

194
votes
2answers
11k views

What is the distinction between DownValues, UpValues, SubValues, and OwnValues?

When reading through the documentation, you often encounter the phrases DownValues, UpValues, ...
116
votes
1answer
7k views

File-backed lists/variables for handling large data

Background Currently I am working with some large data (most of it generated by Mathematica itself). I usually find it a hassle to do this. For example, I just exported a large amount of data to ...
68
votes
7answers
5k views

Functions vs. patterns

Every time I define a new function, I wonder which construct I should use: true functions obtained by using Function, or rule-based syntax. For example, these are ...
61
votes
7answers
16k views

Saving data inside a notebook so that I don't have to run it again?

Piggybacking on this, I am somehow not fully convinced that I can't save data generated by a calculation in a mathematica file so that when I re-launch said file, I wouldn't have to run my ...
49
votes
3answers
3k views

How to distribute proprietary Mathematica code

If I want to make package-code completely unreadable, in a way that the end-user can only call my functions, but has no way to re-engineer my definitions, how would I do that? I know I can use ...
35
votes
2answers
8k views

How to save all data in all variables so that loading it is fast?

I've got this CSV file I've imported that has tens of millions of lines in it. It takes around 20 minutes to import. I've been working with it for a while and have the processed data spread out in a ...
35
votes
2answers
2k views

When to use Get vs Needs

When should I use << vs Needs? I just always use Needs as ...
30
votes
3answers
3k views

DumpSave for the forgetful

A few weeks ago I created a big matrix, and in order not to have to recreate it, I stored it using DumpSave["file.mx", variable]. Now I want to read it back in and ...
15
votes
4answers
9k views

How do I save/export a list so that it can later be easily imported as a list again?

I have a couple of big lists (each of them contains elements that are themselves lists of two elements, i.e. an element of each list that I have is of the form {x, y}) that I want to save/export. ...
12
votes
3answers
747 views

Exporting and reimporting a list of lists changes the dimensions

Could anyone explain to me what in the world is going on here and please help me in reading in dummy.dat properly? ...
10
votes
3answers
607 views

Find variable name from DumpSave on a scoped variable

I saved an InterpolationFunction in a ".mx" files using DumpSave on a variable that was scoped by a ...
10
votes
1answer
1k views

How to properly DumpSave & Get Global`s symbols inside packages while not touching Global context?

For efficiency reasons I prefer to use DumpSave instead of Save. For ease of access I prefer to save symbols in ...
8
votes
1answer
214 views

Most efficient method for export/import of non-traditional tensor-style dimensions of matrices/tables/lists-of-lists-of-lists(-of lists)?

Hello World! (I did it for my first answer, so it only feels proper...I'm not nostalgic, you are!) OKAY, here we go! Let's start off with the good-stuff, here's my code, made relatively arbitrary, ...
8
votes
1answer
7k views

How can I save and recall my own function?

In MATLAB, I can save and recall my own function using an M-File(function or script) How can I do something similar in Mathematica? I already searched and know how to define functions and modules ...
7
votes
3answers
4k views

Save and call matrices with large output in Mathematica [duplicate]

If we have the large matrix A=RandomReal[{-10, 10}, {1000, 1000}]; and I need it for further calculation, how can I save it on hard disk and then call for ...

15 30 50 per page