2020-10-22
(updated
2020-10-22)
— Written by Raul Morales Delgado
/nuggets
|
#python
#numpy In Numpy, the r_
and c_
class objects are utilities that allow users to concatenate objects using slice notation. In this post, I explain how to make the most out of them by modifying its string notation and I measure their performance for concatenating and for reshaping.
2019-08-25
(updated
2020-10-15)
— Written by Raul Morales Delgado
/tutorials
|
#python
#contextlib Because managing resources in Python is better with context managers — and context managers are easier with contextlib
. This article is a small tutorial on why context managers are easier with contextmanager
from contextlib
, where its similarities to a full implementation of with-statement context managers start to become blurrier, and how to effectively handle exceptions.