Language Selection

English French German Italian Portuguese Spanish

NumPy (Python) Series

Filed under
Development
  • How to Use Python NumPy Array – Linux Hint

    Many libraries exist in Python to perform different types of tasks. NumPy is one of them. The full form of NumPy is Numerical Python, and it is mainly used for scientific computing. Multi-dimensional array objects can be defined by using this library that is called the Python NumPy array. Different types of functions exist in the NumPy library to create the array. NumPy array can be generated from the python list of numeric data, range of data, and random data. How NumPy array can be created and used to do different operations types have shown in this tutorial.

  • How to Use Python NumPy arange() Function – Linux Hint

    Many functions exist in the Python NumPy library to perform different types of numerical and scientific operations. Creating different types of arrays for various purposes is one of the practical uses of the NumPy library. Python has a built-in function named arange() to create a list of sequential numbers. arange() is one of the array creation functions of the NumPy library to create an array of numeric ranges. The uses of the NumPy arange() function have explained in this tutorial.

  • How to Use Python NumPy reshape() Function – Linux Hint

    NumPy library has many functions to work with the multi-dimensional array. reshape () function is one of them that is used to change the shape of any existing array without changing the data. The shape defines the total number of elements in each dimension. The array’s dimension can be added or removed, and the number of elements in each dimension can be modified by using the reshape() function. The one-dimensional array can be converted into a multi-dimensional array, but the multi-dimensional array can’t be converted into a one-dimensional array by this function. How to reshape() function works and its uses are explained in this tutorial.

  • How to Use Python NumPy zeros() and ones() Functions – Linux Hint

    NumPy library is one of the useful libraries of python that can be used to create arrays. zeros() and ones() are the NumPy library functions to create two different arrays. zeros() function is used to create an array based on the particular shape and type. All array elements are initialized to 0, which is created by the zeros() function. ones() function works like the zeros() function. But the elements of the array created by the ones() function are initialized to 1. The uses of both functions have shown in this tutorial by using multiple examples.

  • How to convert Python NumPy array to python list – Linux Hint

    Array object is used to store multiple values, and the list object is used in Python to do a similar task to an array object. NumPy array object is used to do different types of numerical operations in Python. The multi-dimensional array can be created by using this library. NumPy library has a built-in tolist() function to convert the NumPy array to the python list. This function does not take any argument and returns the python list. If the array is one-dimensional, then the function will return a simple python list. If the array is multi-dimensional, then the array will return the nested python list. If the array’s dimension is 0, then the function will return a python scalar variable instead of a list. How tolist() function can convert different types of NumPy array to python list is shown in this tutorial.

  • How to install NumPy python development environment on Ubuntu – Linux Hint

    Python is a modern programming language now for supporting a large number of libraries. Various types of tasks can be done by using these libraries. NumPy is one of the useful libraries of Python to perform scientific operations. This library can be used to create a multi-dimensional array of objects. Different types of mathematical tasks can be done quickly using this library, such as sorting the array, reshaping array, statistical operation, arithmetical operations, etc. It works faster because it is developed by using the C programming language.

  • Python Unittest Tutorial

    Unit testing is a testing method used in software engineering for individual units of any code. Users can put the individual tests to determine the status of the source and how much the code is suitable to be used. This way users can test the code quality.

    Testing is done once the process of development is complete. Users can also begin testing when the test script is to be verified based on the criteria of the testing. Developers are expected to write the manual types of the source code. Generally, manually writing unit testing codes is a hectic task but in Python, it is done using an in-built function called unittest.

pip 21.0 has now been released

  • pip 21.0 has now been released

    The Python Packaging Authority (PyPA) has announced the release of pip 21.0. This version removes Python 2.7 and 3.5 support, and drops support for legacy cache entries from pip < 20.0.

  • pip 21.0 has now been released
    # Announcement: pip 21.0 has now been released
    
    
    
    On behalf of the PyPA, I am pleased to announce that we have just released pip 21.0, a new version
    of pip. You can install it by running `python -m pip install --upgrade pip`.
    
    
    
    This is the first scheduled release of pip in 2021, following our regular [quarterly release
    schedule](https://pip.pypa.io/en/stable/development/release-process...).
    
    
    
    ## Highlights
    
    
    
    - Removal of Python 2.7 and 3.5 support.
    
    - Dropped support for legacy cache entries from pip < 20.0.
    
    
    
    You can find more details (including deprecations and removals) in the
    [changelog](https://pip.pypa.io/en/stable/news/).
    
    
    
    ## Regarding Python 2 support
    
    
    
    We've also released pip 20.3.4, which contains certain bugfixes for Python 2 users. It is our final
    Python 2 compatible release, and there are no future Python 2 compatible releases planned.
    
    
    
    Python 2 users will need to continue using a version of pip older than 21.0. Upgrading via pip will
    select a suitable version, because this release is marked as not supporting Python 2. However, if
    you are upgrading from a version of pip older than 9.0.0, that does not support the
    `Requires-Python` metadata, you may need to explicitly request `pip < 21.0`.
    
    
    
    A Python 2.7 compatible version of `get-pip.py` is available at <https://bootstrap.pypa.io/2.7/>.
    
    
    
    ## Thanks
    
    
    
    As with all pip releases, a significant amount of the work was contributed by pip’s user community.
    Huge thanks to all who have contributed, whether through code, documentation, issue reports and/or
    discussion. Your help keeps pip improving, and is hugely appreciated.
    

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.