Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

pickle

best way to preserve numpy arrays on disk

August 18, 2022 by Magenaut

I am looking for a fast way to preserve large numpy arrays. I want to save them to the disk in a binary format, then read them back into memory relatively fastly. cPickle is not fast enough, unfortunately.

Categories Python, Q&A Tags binary-data, numpy, pickle, preserve, python Leave a comment

Unpickling a python 2 object with python 3

August 18, 2022 by Magenaut

I’m wondering if there is a way to load an object that was pickled in Python 2.4, with Python 3.4.

Categories Python, Q&A Tags pickle, python, python-2.4, python-2to3, python-3.x Leave a comment

Unable to load files using pickle and multiple modules

August 17, 2022 by Magenaut

I’m trying to create a user system, which uses a setting and Gui module, and when the GUI module requests for the file to load up using pickle, I keep getting an attribute error. this is from the settings module:

Categories Python, Q&A Tags login, multithreading, pickle, pyqt4, python Leave a comment

What can multiprocessing and dill do together?

August 17, 2022 by Magenaut

I would like to use the multiprocessing library in Python. Sadly multiprocessing uses pickle which doesn’t support functions with closures, lambdas, or functions in __main__. All three of these are important to me

Categories Python, Q&A Tags dill, multiprocessing, pickle, python Leave a comment

Python serialization – Why pickle?

August 17, 2022 by Magenaut

I understood that Python pickling is a way to ‘store’ a Python Object in a way that does respect Object programming – different from an output written in txt file or DB.

Categories Python, Q&A Tags pickle, python, serialization Leave a comment

Pickle or json?

August 16, 2022 by Magenaut

I need to save to disk a little dict object whose keys are of the type str and values are ints and then recover it. Something like this:

Categories Python, Q&A Tags json, pickle, python Leave a comment

Why do I get “Pickle – EOFError: Ran out of input” reading an empty file?

August 15, 2022 by Magenaut

I am getting an interesting error while trying to use Unpickler.load(), here is the source code:

Categories Python, Q&A Tags file, pickle, python Leave a comment

Hitting Maximum Recursion Depth Using Pickle / cPickle

August 15, 2022 by Magenaut

The background: I’m building a trie to represent a dictionary, using a minimal construction algorithm. The input list is 4.3M utf-8 strings, sorted lexicographically. The resulting graph is acyclic and has a maximum depth of 638 nodes. The first line of my script sets the recursion limit to 1100 via sys.setrecursionlimit().

Categories Python, Q&A Tags depth, pickle, python, recursion, tree Leave a comment

Python: Can’t pickle type X, attribute lookup failed

August 15, 2022 by Magenaut

I am trying to pickle a namedtuple:

Categories Python, Q&A Tags pickle, python Leave a comment

Can’t pickle defaultdict

August 14, 2022 by Magenaut

I have a defaultdict that looks like this:

Categories Python, Q&A Tags defaultdict, pickle, python Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress