semvec/pypi-packages huggingface dataset:
pytristan 0.2.0a2
Meshes and differential operators in Python
License: MIT
Requires Python: >=3.8

[![Build and tests](https://github.com/YelyzavetaV/pytristan/actions/workflows/pytristan.yml/badge.svg)](https://github.com/YelyzavetaV/pytristan/actions/workflows/pytristan.yml)
[![codecov](https://codecov.io/gh/YelyzavetaV/pytristan/branch/main/graph/badge.svg?token=KWLTXFRDUE)](https://codecov.io/gh/YelyzavetaV/pytristan)

**pytristan** is a Python package, based on NumPy, that provides *tools for numerical solution of partial differential equations*, such as

* Multi-dimensional meshes
* *(coming soon)* Multi-dimensional differential operators (DO), constructed using different approximation techniques, such as
  - *Fourier spectral method*
  - *Chebyshev collocation method*
  - *Finite-differences method*

# Main features

## *Meshes and differential operators **are** NumPy arrays*

The dedicated mesh's (`Grid`) and DO's (`FourMat`, `ChebMat`, `FinDiffMat`) objects subclass `numpy.ndarray`, benefitting from all of its powerful tools and allowing for convenient and intuitive usage.

## *Simple API to treat cases of special geometry*

pytristan provides simplified interfaces to treat some specific cases, such as, for instance, *polar geometry*. Besides, there are pre-defined *mapping* functions in case the user aims to build a non-uniform mesh. It is also possible to define custom mappers and apply them as easily as the pre-defined ones.

For complete flexibility and control over the program, the user can opt for a more manual approach to construct the same objects using a generic interface.

## *Re-usage of once allocated objects*

If it's necessary to re-use the same mesh or DO multiple times in the same program, pytristan spares a user the need to reconstruct them or repeatedly pass their variables between functions. Once allocated, they can be extracted from memory by calling a dedicated getter function with a simple interface *anywhere in the same program*.

# Installation

You can install pytristan using pip:

```
pip install pytristan
```

Alternatively, the source code is available on [GitHub](https://github.com/YelyzavetaV/pytristan "pytristan on GitHub").

# Dependencies

* [NumPy - the fundamental package for scientific computing with Python](https://numpy.org "NumPy")

# License

[MIT](https://opensource.org/licenses/MIT "MIT license")
aioify 0.4.1
Make every Python function async/await
License: MIT
Requires Python: >=3.6,<3.10
Keywords: asyncio,async,await,aioify,wrap

aioify (maintenance mode)
=========================

Authors of aioify and module-wrapper decided to discontinue support of
these libraries since the idea: "let's convert sync libraries to async
ones" works only for some cases. Existing releases of libraries won't
be removed, but don't expect any changes since today. Feel free to
fork these libraries, however, we don't recommend using the automatic
sync-to-async library conversion approach, as unreliable. Instead,
it's better to run synchronous functions asynchronously using
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor
or https://anyio.readthedocs.io/en/stable/api.html#running-code-in-worker-threads.

Old documentation
-----------------

Make every function async and await-able.

Usage
-----

```
pip install aioify
```

For example, make `os`, `shutil` and user defined function await-able.

```Python
#!/usr/bin/env python
###########
# Warning #
###########
# This code should be executed only on POSIX OS with at least 1 GiB free space in /tmp/ directory and RAM!

from aioify import aioify
import os
import shutil


def generate_big_file(filename, file_size):
    with open(file=filename, mode='wb') as f:
        f.write(os.urandom(file_size))


aiogenerate_big_file = aioify(obj=generate_big_file)
aios = aioify(obj=os, name='aios')
aioshutil = aioify(obj=shutil, name='aishutil')


async def main():
    dir_path = '/tmp/big-files/'
    await aios.makedirs(name=dir_path, exist_ok=True)
    filename = os.path.join(dir_path, 'original')
    copy_filename = os.path.join(dir_path, 'copy')
    file_size = 1024 * 1024 * 1024
    await aiogenerate_big_file(filename=filename, file_size=file_size)
    await aioshutil.copy(src=filename, dst=copy_filename)
    await aioshutil.rmtree(path=dir_path)


if __name__ == '__main__':
    import asyncio as aio
    loop = aio.get_event_loop()
    loop.run_until_complete(main())
```