Skip to main content

Tools to simplify the use of URANIE with python

Project description

uratools

This Python module provides tools to simplify the use of URANIE with Python

uratools aims to provide a multitude of utilities designed to enhance the user experience, particularly by facilitating ports to NumPy, interfacing Uranie with Python machine learning libraries (PyTorch, TensorFlow, and scikit-learn), and providing tools for fitting empirical distributions and generating plots easily. It will be updated regularly.

URANIE

Installation

pip install uratools

How to use it

Before using the package, ensure that URANIE is installed and properly sourced.

The python command to use the package is the following

from uratools import converter

Documentation is available on this page https://uratools-508bc1.gitlab.io/

Example

import numpy as np
import ROOT
from ROOT.URANIE import DataServer, Sampler
from uratools import converter

## == np.array to DataServer
mA = np.random.randn(10,2)
tds = converter.np2ds(mA, "x1:x2") ## a DataServer.TDataServer is created from np.array

## == DataServer to np.array 
tds = DataServer.TDataServer()
tds.addAttribute(DataServer.TUniformDistribution("x1",0.0, 5.0))
tds.addAttribute(DataServer.TNormalDistribution("x2",-2.0, 0.5))
sam = Sampler.TSampling(tds,"lhs",20)
sam.generateSample()

npA = converter.ds2np(tds) ## a np.array is created from a DataServer.TDataServer

Support

support-uranie@cea.fr

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uratools-1.0.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uratools-1.0.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file uratools-1.0.0.tar.gz.

File metadata

  • Download URL: uratools-1.0.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for uratools-1.0.0.tar.gz
Algorithm Hash digest
SHA256 91e3dbf326a61835afa92df6fe5a7f9f8ad3615d615d31e30b64656842c2ae25
MD5 9f76598ed31183f49d44b8ae0928e58e
BLAKE2b-256 41b0a739fd1006bdb4e84e5111e108b40c83156ab82d88dca9d945a919c179b7

See more details on using hashes here.

File details

Details for the file uratools-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: uratools-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for uratools-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aff1ce696c32449688e34ec774517f548a47d7a3de0bba0b9b8290a1e1161b07
MD5 d3c49a93cb18b7cb0ead914783cf1ae6
BLAKE2b-256 f499108c1a32c8902342514abcea77edd9d7abae259290f95e4ff84d4f888d1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page