Author name: mkumar

Save NumPy array to file

1. Intro We can learn about creating a NumPy array from plain text files like CSV, and TSV in another tutorial. In this tutorial, we will see methods that help us in saving the NumPy array on the file system. We can further use them to create a NumPy array. Few techniques are critical for …

Save NumPy array to file Read More »

Create NumPy array from Text file

1. Intro NumPy has helpful methods to create an array from text files like CSV and TSV. In real life our data often lives in the file system, hence these methods decrease the development/analysis time dramatically. numpy.loadtxt(fname, dtype=, comments=’#’, delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False, ndmin=0, encoding=’bytes’, max_rows=None) The Numpy loadtxt() method is an efficient way …

Create NumPy array from Text file Read More »

Auto generate NumPy array

  1. Intro We are sometimes required to generate a NumPy array automatically for testing or other purposes. NumPy provides methods to create a NumPy array with the same numerical values, values between two numbers, and the identity matrix. In this tutorial, we will see code examples for most of the available methods. These methods …

Auto generate NumPy array Read More »

FastAPI Intro

Setup on my Mac (Macbook Pro 15 inch Retina, Mid 2014) Prerequisite Python 3.6+ (I used 3.7.x. I recently reinstalled OS after cleaning up disk, where stock Python 2.7 was available. I installed Pyenv and then used it to install 3.7.x). I already had a git repo initialized at Github for this project. I checked …

FastAPI Intro Read More »