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

IBM/Red Hat: Kafka Monthly Digest, Red Hat Upselling, and Cockpit 239

  • Kafka Monthly Digest – February 2021

    This is the 37th edition of the Kafka Monthly Digest! In this edition, I’ll cover what happened in the Apache Kafka community in February 2021.

  • 5 ways Red Hat Insights can improve your sysadmin Life

    The way we do things is changing fast. This has become a necessity as our systems get more complex, our workloads evolve, and our deployments rapidly grow in size. Thanks to the innovations brought about by openness and collaboration, we can develop tools and services to cope with these quickly evolving times. For us to reap the benefits of these advancements, we should open ourselves to carefully exploring how various tools suit our requirements and fit into or change our norms. By doing so, we may simplify a lot of our mundane tasks, reduce overhead, and address the major pain points in our operations. Having worked as a sysadmin in the past, I've discovered many automation tools and services that have made my life easier. One of the most recent is Red Hat Insights. In this article, I share five ways this service that is included with your Red Hat Enterprise Linux (RHEL) subscription can improve your life as an admin.

  • Cockpit Project: Cockpit 239

    Cockpit is the modern Linux admin interface. We release regularly. Here are the release notes from Cockpit version 239.

LibreOffice 7.1.1 Community available for download

LibreOffice 7.1.1 Community, the first minor release of the LibreOffice 7.1 family, targeted at technology enthusiasts and power users, is available for download from https://www.libreoffice.org/download/. LibreOffice 7.1.1 includes over 90 bug fixes and improvements to document compatibility. For enterprise-class deployments, TDF strongly recommends the LibreOffice Enterprise family of applications from ecosystem partners, with long-term support options, professional assistance, custom features and Service Level Agreements: https://www.libreoffice.org/download/libreoffice-in-business/. LibreOffice Community and the LibreOffice Enterprise family of products are based on the LibreOffice Technology platform, the result of years of development efforts with the objective of providing a state of the art office suite not only for the desktop but also for mobile and the cloud. Products based on LibreOffice Technology are available for major desktop operating systems (Windows, macOS, Linux and Chrome OS), mobile platforms (Android and iOS) and the cloud. They may have a different name, according to each company brand strategy, but they share the same LibreOffice unique advantages, robustness and flexibility. Read more

croc Is A Tool For Resumable, Encrypted File And Folder Transfers Between Computers (Command Line)

croc is a free and open source command line tool for secure file transfers between computers. It uses relay-assisted peer-to-peer transactions and end-to-end encryption via password-authenticated key exchange. The program is written in Go and is available for Microsoft Windows, macOS, Linux and *BSD. The idea behind croc is being able to transfer files and folders between cross-platform computers securely, fast and easy. With support for resumable, peer-to-peer transfers. As a bonus feature, croc is also able to securely transfer a short text or URL directly. The data transfer is done using a relay, either using raw TCP sockets or websockets. When the sender and the receiver are on the same LAN, croc uses a local relay, otherwise a public relay is used. Thanks to this, croc can send files between computers in the same LAN, or over the Internet, without having port-forwarding enabled. The data going through the relay is encrypted using a PAKE-generated session key. For this, croc uses code phrases, a combination of three random words. By default, a code phrase can only be used once between two parties, so an attacker would have a chance of less than 1 in 4 billion to guess the code phrase correctly to steal the data. Read more

Linux distributions: All the talent and hard work that goes into building a good one

I regularly read the Linux Mint Blog, not only because it is useful to keep up with what is happening with the Linux Mint distribution but also because it occasionally gives very interesting insights into the development and maintenance of a Linux distribution in general, and the Linux Mint distribution(s) in particular. To be honest, I was disappointed some years ago when Clem (Clement Lefebvre) discontinued his Segfault blog, because it always contained good technical information and interesting insights. Read more