Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "numpy"
2010: PHP, CSS, Vanilla JS, and a LAMP Server.
Ah, the simple life.
2016: Node.js, React, Vue, Angular, AngularJS, Polymer, Sass, Less, Gulp, Bower, Grunt.
I can't handle this, I'm shifting domains to Machine Learning.
2017: Numpy, Scipy, TensorFlow, Theano, Keras, Torch, CNNs, RNNs, GANs and LOTS AND LOTS OF MATH!
Okay, okay. Calm down there fella.
Python Tools to Get Started with Machine Learning
SciPy - the most fundamental library with essential packages such as NumPy, matplotlib, Pandas, and SymPy.
NumPy - gives you the ability to play with your data as 'arrays' using some powerful array functions and linear algebra functions. Very essential since most computing is done with arrays of numbers.
Matplotlib - to visualize data and model outputs using 2D plotting with some 3D functionality.
Pandas - a highly flexible package which introduces dataframes to Python, a type of in-memory data table. Makes it easy to understand the data's structure and provides easy to use SQL-like commands to play with the data.
SymPy - is a package used for symbolic mathematics and computer algebra.
StatsModels - commonly used package for statistical methods and algorithms.
Scikit-learn - Most popular and easy to understand library filled with machine learning algorithms. A good start for beginners and practitioners working with smaller data loads.
RPy2 - A cross between Python and R. Allows you to call R functions from within Python.
NLTK (Natural Language Toolkit) - this toolkit in Python has functions and methods for text analysis.13
Finally program running perfectly 👍
But wait.... Lets add another feature...
New feature needs updated matplotlib...
Lost support with numpy😫🤔
Updated numpy 😫
Run program again...
Core dumped (segmentation fault)😶😶
Time to leave this planet10
When you encounter a bug in your code while writing a test and you have absolutely no idea what's wrong...
...and then you see it's a type problem.
after beginning to learn numpy , i believe these packages were really created by some clown of a circus xD.
Everything is sooooo entertaining!!!
i learned java 3 years ago, but today if i had to crap out some crazy java or c++ expert , i would tell him about numpy's arrays...
Like , "hey dude python has this cool data structure in the numpy library called arrays, which can hold any datatypes in a kind of arraylist like fashion, and you can convert them from 1 dimensional to 1000 dimensional in just 1 line , and also do you know we can select any column with just array[position]? and even this position does not needs to be an integer, you can use a list , like array[[1,2,3]] will give you elements at array,array,array, and...."
wait, why is my friend dead ? xD
How deep does the rabbit hole go?
Problem: Convert numpy array containing an audio time series to a .wav file and save on disk
Me: pip install "stupid package"
Console: Can't pip, behind a proxy
Me: Finds workaround after several minutes
Conversion works, but audio file on disk doesn't work
Encoding Error only works with array of ints not floats
BUT I NEED IT TO BE FLOATS
Looks for another library
scikits.audiolab <- should work
Me: pip --proxy=myproxy:port install "this shit"
Command Line *spits back huge error*
Googles error <- You need to install this package with a .whl file
Me: Downloads .whl file <- pip install "filename".whl
Command Line: ERROR: scikits.audiolab-0.11.0-cp27-cp27m-win32.whl is not a supported wheel on this platform.
Googles Error <- Need to see supported file formats
Me: python -c "import pip; print(pip.pep425tags.get_supported())"
Console: AttributeError: module 'pip' has no attribute 'pep425tags'
Googles Error <- Use another command for pip v10
Me: python -c "import pip._internal; print(pip._internal.pep425tags.get_supported())"
Me: pip install "filename".whl
Me: *spends 30 minutes to find directory where I should paste .dll file*
Finds Directory (was hidden btw), pastes file
Me: Runs .py file
Console: from version import version as _version ModuleNotFoundError: No module named 'version'
Googles Error <- Fix is: "just comment out the import statement"
Unfortunately this shit still didn't work after two hours of debugging, lmao fuck this7
I love python, but I hate dealing with python dependencies, especially on Windows.
I was tinkering and researching with neural networks, so I wanted to try out pybrain. I wrote my project, with pybrain installed via pip, and tried to build it.
Oh, what's that? Pybrain doesn't work with python 3? Well I'll download the version that's supposed to. Oh, that version has a deprecated numpy api? Let me just install those other resources. Oh, that requires a broken module that has no publicly available source?
Let's try python 2. Oh, now that's working, I just need to export environment variables for some "bls source". Some quick Google searching and the only solution that would work is building a bunch of cywgin modules by hand. That's fine, I have an ubuntu partition.
An hour later I'm compiling FORTRAN dependencies on Ubuntu.
Coding time: 1 hour
Dependency time: 3 hours6
I told interns in my startup to code a GAN only using Numpy. I received 4 resignation letters the next day14
When I first began with Python I really missed the static typed checking from Java, I barely know anything about a returned object from a method and have to read the API extensively for every new library.
After a while I finally understand why Python is so powerful, the combination of dynamic typed language and rich default methods make the language unbeatable for your productivity.
While Java's Object only has toString(), hashCode(), equals() or clone(), Python's basic Class has every fucking method for every scenario I could ever image. No wonder that libraries like numpy or pandas work so well and fluidly.8
Sorry Google, you got it wrong this time ....
Oh my gosh, look at that function definition ...
Oh my gosh, look at that variable ...
Oh my gosh, look at that zone ...
Oh my gosh, look at that long ...
Oh my gosh, look at that short ...
Oh my gosh, look at that stop ... is more my style.10
Okay! Got my numpy pdf, theano pdf and my theano deep learning pdf! It’s time to get reading for 1111111111111111111111111111111111111 hours. Wow! I’m really getting deep into “deep learning” learning! Ok, I’ll quit now...2
Reading through one of my posts I’ve realized how much ego programmers can actually have. Guys, some of you have already mastered or grasped more than just the foundations of the industry standard languages, as well as developed a very solid intuition behind some design patterns and a solid understanding of some frameworks and libraries, say NumPy, say React... we get it.
You don’t have to be such condescending assholes and be offended by some of the jokes we, programming beginners, make to release stress or just to have fun.
You already have some amazing developer and engineering skills. Do not ruin it with such a detrimental attitude; I make this post because I myself have made this mistake, and I still do to this day. But if what I’ve felt reading your comments is what non-programming people feel when around me, I wouldn’t be surprised if I found that some people hated me or just wanted to kill me.
I don’t know if this will get downvot’d or if more people think like this. But I needed to share this, even just as a reflection of my very own attitude.
Thank you for your time,
so, my friend was telling me, his ex texted him and asked, I'm quoting,
'How to install numpy and pandas in python?'
she wanted to try machine learning !!1
My main focus Is data analysis. Being a physics student I do quite a lot of this using the likes of numpy and matplotlib, or GNU Octave.6
Right now, everything. I started at a Consulting firm because I expected many new problems to tackle, solutions to develop and generally to always have a fire burning underneath my ass but instead I always develop the same standard bullshit.
I miss the days in my old job when there was just a problem and the task to solve it. When I stared down giant amounts of data, just KNOWING that somewhere in that mess is some structure I could exploit and that short moment of inspiration when I finally pinpointed it. The rush of endorphins when the solution became clear and everything fell into place to form a beautiful pattern amidst the chaos test data, git commits and numpy arrays.
Now its just "Yeah, would you just write another selenium testsuite that throws out fail or pass and wastes all the information because the only reason I'm a testmanager is because I'm too incompetent to do anything else and not my passion for the field".
The constant, mind numbing repetition of always the same patterns where the occasional dynamic element that becomes stale is the highlight of my work week... I would have never thought that making good money with easy work would ever get me as close to depression as it did.6
Ideas I've had over the years that could pan out and be useful:
SMS-DB: Stands for SMS-Data Burst. Used to allow those with low cell signal or no data plan to transfer data between a phone and some client via the standard SMS text space. Would be slow, but would act kinda like dial-up over SMS (as mobile lines are compressed on all service levels, even LTE, so traditional dial-up wouldn't work!) I have a general idea on how packets would be laid out, but that's about it so far...
everything2PNG: Allows one to transpose any file's data into a PNG with a 3 byte per pixel (full color RGB), which allows for a "compression" of sorts (about 91, 93% on preliminary tests) AND allowing further, more efficient compression of the resulting file. (Plus... it's just kinda cool to see files transposed as PNGs.) I actually have a simple transposer to go to PNG, but can't yet go back. Large files (around 600MB) use upwards of 4GB with efficient paging and other optimizations via NumPy so far, so it's not *viable* yet, but it's coming along nicely.
RPi-GPIO Interconnection Bus: A master/slave or round robin method to allow for Raspberry Pis to communicate using GPIO, which can help free up network bandwidth in RPi cloud computing clusters. At most, this'd allow for 4 bits used for pushing to the GPIO "bus", and 4 bits used for pulling from the "bus". 8 pins total are usually unused minimum, so either 3 or 4 pins for upload, 3 or 4 for download, and potentially 1 or 2 for commands, general non-data communication, etc. I made a version of this concept using Round Robin for a client, but it was horribly slow. (I also don't have distribution rights for the code, so i'm working from scratch.) Definitely doable.
Fuck yeah ... I have uploaded my major computation file to S3 and create Lambdas from those files(includes numpy and pandas also) and now I have only routes and invoke strategies in my EC3 .. looking for cost reduction....
So, I'm using Vpython for my physics class.
The good thing is that I love that. The bad thing is that the last update to vpython was in 2015.
Well, I update my system yesterday and apparently one of the libraries got an API update and that broke Vpython and can't be used again T.T
I'm trying to fix the code at the moment ;-;1
Who on earth decided, that float64 is a suitable default datatype for one-hot vectors in numpy?
That's what I deserve for relying on reasonable implicit behaviour1
I want to manipulate CSV files with Python and I was using NumPy, what I want to do is 3 columns, with an undetermined number of rows, and I want to be able to remove, add and edit every value, this is my questions:
Should I use NumPy? (if yes, please tell me how, I've been searching on google and I couldn't find anything of help! If not, please tell me what I should use,)4