Month: March 2021

[Solved] NumPy RuntimeWarning: All-NaN slice encountered

Problem Formulation You use NumPy’s np.nanmedian() function in your code that is supposed to ignore NaN values when computing the mean of a NumPy array. But when using it, NumPy raises a RuntimeWarning: All-NaN slice encountered message: What is the reason for this warning and how to fix it? Solution + Explanation The reason this …

[Solved] NumPy RuntimeWarning: All-NaN slice encountered Read More »

A Simple Introduction to Set Comprehension in Python

Being hated by newbies, experienced Python coders can’t live without this awesome Python feature. In this article, I give you everything you need to know about set comprehensions using the bracket notation {}. What is Set Comprehension? Set comprehension is a concise way of creating sets in Python using the curly braces notation {expression for …

A Simple Introduction to Set Comprehension in Python Read More »

How to Get an HTML Page from a URL in Python?

This tutorial shows you how to perform simple HTTP get requests to get an HTML page from a given URL in Python! Problem Formulation Given a URL as a string. How to extract the HTML from the given URL and store the result in a Python string variable? Example: Say, you want to accomplish the …

How to Get an HTML Page from a URL in Python? Read More »

Alexa Skill

How to Create Alexa Skills in Python? A Simple Overview for Beginners

Alexa is on the way to lead the next wave of technological disruption. Have you ever asked yourself about the exact steps needed to create an Alexa Skill? And how these steps interplay with each other? To answer these questions, I give you a quick overview of Alexa Skill development in Python. This article serves …

How to Create Alexa Skills in Python? A Simple Overview for Beginners Read More »