Saravanan666/pypi-org huggingface dataset:
Package: xarrayMannKendall
xarrayMannKendallCondaTravis CI (Python 3.8)Code CoverageZenodoxarrayMannKendallis a module to compute linear trends over 2D and 3D arrays.
For 2D arraysxarrayMannKendallusesxarrayparallel capabilities to speed up the computation.For more information on the Mann-Kendall method please refer to:Mann, H. B. (1945). Non-parametric tests against trend,Econometrica,13, 163-171.Kendall, M. G. (1975). Rank Correlation Methods, 4th edition, Charles Griffin, London.Yue, S. and Wang, C. (2004). The Mann-Kendall test modified by effective sample size to detect trend in serially correlated hydrological series.Water Resources Management,18(3), 201–218. doi:10.1023/b:warm.0000043140.61082.60andHussain, M. and Mahmud, I. (2019). pyMannKendall: a python package for non parametric Mann Kendall family of trend tests.Journal of Open Source Software,4(39), 1556. doi:10.21105/joss.01556A useful resource can be foundhere. Finally, another library that allows to compute a larger range of Mann-Kendall methods ispyMannKendall.This package was primarily developed for the analyisis of ocean Kinetic Energy trends
over the satellite record period that can be found at doi:10.1038/s41558-021-01006-9.The data analysed with using this module can be found atEKE_SST_trendsrepository.Installation:You can install the latest tagged release of this package viaconda-forgeby:conda install -c conda-forge xarrayMannKendallAlternatively, you can clone the repository and install. To do so, make sure you
have the module requirements (numpy&xarray):pip install -r requirements.txtconda install --file ./requirements.txtNow you can install the modulepip install -e .for local installation usepip install --ignore-installed --user .Cite this code:This repository can be cited as:Josué Martínez Moreno, & Navid C. Constantinou. (2021, January 23). josuemtzmo/xarrayMannKendall: Mann Kendall significance test implemented in xarray. (Version v.1.0.0). Zenodo.http://doi.org/10.5281/zenodo.4458777
Package: xarray-ome-ngff
xarray-ome-ngffIntegration between xarray and the ome-ngff data model.At present (February, 2023) this is a partial implementation of theOME-NGFF spec. Specifcally,onlythemultiscalesand specs required bymultiscalesare implemented. Complete support for the spec would be welcome.How it worksThis library depends onpydantic-ome-ngffwhich implements OME-NGFF metadata aspydanticmodels.Axesmetadata is inferred from a DataArray by iterating over the dimensions of the array and checking forunitsandtypeproperties in the attributes of thecoordsassigned to each dimension. Dimensions without coordinates will raise an exception. Scale and translationCoordinateTransformsare inferred by inspecting the values of the coordinates for each dimension. Be advised that no attempt is made to verify that arrays are sampled on a regular grid.UsageGeneratemultiscalesmetadata from a multiscale collection of DataArrays.fromxarrayimportDataArrayimportnumpyasnpfromxarray_ome_ngffimportcreate_multiscale_metadataimportjsoncoords={'z':DataArray(np.arange(100),attrs={'units':'nm','type':'space'},dims=('z',)),'y':DataArray(np.arange(300)*2.2,attrs={'units':'nm','type':'space'},dims=('y')),'x':DataArray((np.arange(300)*.5)+1,attrs={'units':'nm','type':'space'},dims=('x',))}s0=DataArray(data=0,coords=coords,dims=('z','y','x'),name='s0')s1=s0.coarsen({dim:2fordimins0.dims}).mean()s1.name='s1'# create a small multiscale pyramidmultiscale=[s0,s1]metadata=create_multiscale_metadata(name='test',type='yes',arrays=multiscale)print(metadata.json(indent=2)){"version":"0.5-dev","name":"test","type":"yes","metadata":null,"datasets":[{"path":"s0","coordinateTransformations":[{"type":"scale","scale":[1.0,2.2,0.5]},{"type":"translation","translation":[0.0,0.0,1.0]}]},{"path":"s1","coordinateTransformations":[{"type":"scale","scale":[2.0,4.4,1.0]},{"type":"translation","translation":[0.5,1.1,1.25]}]}],"axes":[{"name":"z","type":"space","units":null},{"name":"y","type":"space","units":null},{"name":"x","type":"space","units":null}],"coordinateTransformations":[{"type":"scale","scale":[1.0,1.0,1.0]}]}It is not possible to create a DataArray from OME-NGFF metadata, but together the OME-NGFFAxesandCoordinateTransformationsmetadata are sufficient to createcoordinatesfor a DataArray, provided you know the shape of the data. The functioncreate_coordsperforms this operation:fromxarray_ome_ngffimportcreate_coordsfrompydantic_ome_ngff.v05.coordinateTransformationsimportVectorScaleTransform,VectorTranslationTransformfrompydantic_ome_ngff.v05.axesimportAxisshape=(3,3)axes=[Axis(name='a',units="meter",type="space"),Axis(name='b',units="meter",type="space")]transforms=[VectorScaleTransform(scale=[1,.5]),VectorTranslationTransform(translation=[1,2])]coords=create_coords(axes,transforms,shape)print(coords)'''{'a': <xarray.DataArray (a: 3)>array([1., 2., 3.])Dimensions without coordinates: aAttributes:units:    meter, 'b': <xarray.DataArray (b: 3)>array([2. , 2.5, 3. ])Dimensions without coordinates: bAttributes:units:    meter}'''
Package: xarray-pickler
Simple package to speed up ‘multi-file open’ operations for xarray datasets. Uses a cache of pickle files to store the metadata in thexarray.Datasetobject.Free software: BSD - see LICENSE file in top-level package directoryDocumentation:https://xarray-pickler.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: xarray-quantity
xarray-quantityxarray extension which supports astropy quantities.FeaturesThis library provides:xarray DataArray and Dataset with units.Installationpipinstallxarray-quantityUsageQuantityArrayTo create a DataArray with units, useQuantityArrayclass. The arguments are compatible with DataArray, except the keyword argumentunit.>>>qa=QuantityArray([1,2,3,4,5],unit="km")>>>qa.data[1,2,3,4,5]km>>>qa.unitkmQuantitySetTo create a Dataset with units, useQuantitySetclass. This class also has compatibility with xarray's Dataset.>>>arrays={..."qa1":QuantityArray([1,2,3,4,5],unit="km/s"),..."qa2":QuantityArray([11,12,13,14,15]),..."da3":xr.DataArray([111,112,113,114,115])...}>>>qs=QuantitySet(arrays)>>>qs.qa1.data[1,2,3,4,5]km/s>>>qs.qa2xarray.QuantityArray'qa2'(dim_0:5)<Quantity[11.,12.,13.,14.,15.]km/s>Coordinates:(0)Attributes:(0)This library is usingSemantic Versioning.
Package: xarray-regrid
xarray-regrid: Regridding utilities for xarray.With xarray-regrid it is possible to regrid between two rectilinear grids. The following methods are supported:LinearNearest-neighborConservativeCubic"Most common value" (zonal statistics)Note that "Most common value" is designed to regrid categorical data to a coarse resolution. For regridding categorical data to a finer resolution, please use "nearest-neighbor" regridder.Installationpip install xarray-regridUsageThe xarray-regrid routines are accessed using the "regrid" accessor on an xarray Dataset:importxarray_regridds=xr.open_dataset("input_data.nc")ds_grid=xr.open_dataset("target_grid.nc")ds.regrid.linear(ds_grid)For examples, see the benchmark notebooks and the demo notebooks.BenchmarksThe benchmark notebooks contain comparisons to more standard methods (CDO, xESMF).To be able to run the notebooks, a conda environment is required (due to ESMF and CDO).
You can install this environment using theenvironment.ymlfile in this repository.Micromambais a lightweight version of the much faster "mamba" conda alternative.micromambacreate-nenvironment_name-fenvironment.ymlAcknowledgementsThis package was developed under Netherlands eScience Center grantNLESC.OEC.2022.017.
Package: xarray-schema
xarray-schemaSchema validation for XarrayinstallationInstall xarray-schema from PyPI:pipinstallxarray-schemaConda:condainstall-cconda-forgexarray-schemaOr install it from source:pipinstallgit+https://github.com/carbonplan/xarray-schemausageXarray-schema's API is modeled afterPandera. TheDataArraySchemaandDatasetSchemaobjects both have.validate()methods.The basic usage is as follows:importnumpyasnpimportxarrayasxrfromxarray_schemaimportDataArraySchema,DatasetSchema,CoordsSchemada=xr.DataArray(np.ones(4,dtype='i4'),dims=['x'],name='foo')schema=DataArraySchema(dtype=np.integer,name='foo',shape=(4,),dims=['x'])schema.validate(da)You can also use it to validate aDatasetlike so:schema_ds = DatasetSchema({'foo': schema})

schema_ds.validate(da.to_dataset())Each component of the Xarray data model is implemented as a stand alone class:fromxarray_schema.componentsimport(DTypeSchema,DimsSchema,ShapeSchema,NameSchema,ChunksSchema,ArrayTypeSchema,AttrSchema,AttrsSchema)# example constructionsdtype_schema=DTypeSchema('i4')dims_schema=DimsSchema(('x','y',None))# None is used as a wildcardshape_schema=ShapeSchema((5,10,None))# None is used as a wildcardname_schema=NameSchema('foo')chunk_schema=ChunkSchema({'x':None,'y':-1})# None is used as a wildcard, -1 is used asArrayTypeSchema=ArrayTypeSchema(np.ndarray)# Example usagedtype_schama.validate(da.dtype)# Each object schema can be exported to JSON formatdtype_json=dtype_schama.to_json()roadmapThis is a very early prototype of a library. Some key things are missing:Validation ofcoordsandattrs. These are not implemented yet.Exceptions: Pandera accumulates schema exceptions and reports them all at once. Currently, we are a eagerly raisingSchemaErrorswhen the are found.Roundtrip schemas to/from JSON and/or YAML format.licenseAll the code in this repository isMITlicensed, but we request that you please provide attribution if reusing any of our digital content (graphics, logo, articles, etc.).about usCarbonPlan is a non-profit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions through open data and tools. Find out more atcarbonplan.orgor get in touch byopening an issueorsending us an email.
Package: xarray-simlab
xarray-simlab is a Python library that provides both a generic
framework for building computational models in a modular fashion and axarrayextension for setting and running simulations using the
xarray’sDatasetstructure. It is designed for fast, interactive
and exploratory modeling.xarray-simlab is well integrated with other libraries of the PyData
ecosystem such asdaskandzarr.In a nutshellThe Conway’s Game of Life example shown below is adapted from thisblog postby Jake VanderPlas.Create new model components by writing compact Python classes,
i.e., very much likedataclasses:importnumpyasnpimportxsimlabasxs@xs.processclassGameOfLife:world=xs.variable(dims=('x','y'),intent='inout',encoding={'fill_value':None})defrun_step(self):nbrs_count=sum(np.roll(np.roll(self.world,i,0),j,1)foriin(-1,0,1)forjin(-1,0,1)if(i!=0orj!=0))self._world_next=(nbrs_count==3)|(self.world&(nbrs_count==2))deffinalize_step(self):self.world[:]=self._world_next@xs.processclassGlider:pos=xs.variable(dims='point_xy',description='glider position')world=xs.foreign(GameOfLife,'world',intent='out')definitialize(self):x,y=self.poskernel=[[1,0,0],[0,1,1],[1,1,0]]self.world=np.zeros((10,10),dtype=bool)self.world[x:x+3,y:y+3]=kernelCreate a new model just by providing a dictionary of model components:model=xs.Model({'gol':GameOfLife,'init':Glider})Create an inputxarray.Dataset, run the model and get an outputxarray.Dataset:input_dataset=xs.create_setup(model=model,clocks={'step':np.arange(9)},input_vars={'init__pos':('point_xy',[4,5])},output_vars={'gol__world':'step'})output_dataset=input_dataset.xsimlab.run(model=model)>>>output_dataset<xarray.Dataset>Dimensions:(point_xy:2,step:9,x:10,y:10)Coordinates:*step(step)int64012345678Dimensionswithoutcoordinates:point_xy,x,yDatavariables:init__pos(point_xy)int6445gol__world(step,x,y)boolFalseFalseFalseFalse...FalseFalseFalsePerform model setup, pre-processing, run, post-processing and
visualization in a functional style, using method chaining:importmatplotlib.pyplotaspltwithmodel:(input_dataset.xsimlab.update_vars(input_vars={'init__pos':('point_xy',[2,2])}).xsimlab.run().gol__world.plot.imshow(col='step',col_wrap=3,figsize=(5,5),xticks=[],yticks=[],add_colorbar=False,cmap=plt.cm.binary))DocumentationDocumentation is hosted on ReadTheDocs:http://xarray-simlab.readthedocs.ioLicense3-clause (“Modified” or “New”) BSD license,
seeLicense file.xarray-simlab uses short parts of the code of thexarray,pandasanddasklibraries. Their licenses are reproduced in the “licenses”
directory.AcknowledgmentThis project is supported by theEarth Surface Process Modellinggroup of the GFZ Helmholtz Centre Potsdam.CitationIf you use xarray-simlab in a scientific publication, we would
appreciate acitation.
Package: xarray-simpleunits
Xarray_SimpleUnitsUnitful calculations withxarrayKeeps track of units when working withxarray.DataArrays
andxarray.Datasets usingastropy.unitsfor the conversions.:warning: This package is inalphastage, that is, it works mostly,
but the interface might still be subject to change.InstallRequirementsastropy- requiredxarray- requiredpytest- optional, for testingxarray_simpleunitsAn installablepippackage calledxarray-simpleunitswill be available soon
from the main package repository, it can then be installed with:$pipinstallxarray_simpleunitsThe latest development version can be installed
withpipdirectly from github
(seehttps://pip.pypa.io/en/stable/reference/pip_install/#vcs-supportandhttps://pip.pypa.io/en/stable/reference/pip_install/#git):$pipinstall[-e]git+https://github.com/st-bender/xarray-simpleunits.gitThe other option is to use a local clone:$gitclonehttps://github.com/st-bender/xarray-simpleunits.git
$cdxarray-simpleunitsand then usingpip(optionally using-e, seehttps://pip.pypa.io/en/stable/reference/pip_install/#install-editable):$pipinstall[-e].or usingsetup.py:$pythonsetup.pyinstallOptionally, test the correct function of the module with$py.test[-v]or even including thedoctestsin this document:$py.test[-v]--doctest-glob='*.md'UsageThe python module itself is namedxarray_simpleunitsand is imported as usual.All functions should benumpy-compatible and work with scalars
and appropriately shaped arrays.>>>importxarray_simpleunitsasxruThe module basically works by adapting (“monkey-patching”) thexarray.Variablearithmetic
methods to honour and keep track of the "units" attribute.
To initialize unit handling withxarray, callinit_units()first:>>>importxarray_simpleunitsasxru>>>xru.init_units()(A similar method to restore the original behaviour is planned.)So far, the supported operations are addition, subtraction, multiplication, and division.
Unit mismatch when adding or subtracting unitful arrays raises an exception.
Currently, unit handling withxarray.DataArrayrequires that the respective
array is on the left side of any calculation:>>>fromastropyimportunitsasau>>>importnumpyasnp>>>importxarrayasxr>>>importxarray_simpleunitsasxru>>>np.set_printoptions(precision=6)>>>xru.init_units()>>>ds=xr.Dataset(...data_vars={..."s":("x",[1.,2.,3.],{"units":"m"}),..."t":("x",[3.,2.,1.],{"units":"s"}),...},...)>>>v=ds["s"]/ds["t"]>>>v<xarray.DataArray(x:3)>array([0.333333,1.,3.])Dimensionswithoutcoordinates:xAttributes:units:m/s>>># using `astropy` units directly:>>>v=ds["s"]/(2*au.Unit("s"))>>>v<xarray.DataArray's'(x:3)>array([0.5,1.,1.5])Dimensionswithoutcoordinates:xAttributes:units:m/sBasic class and method documentation is accessible viapydoc:$pydocxarray_simpleunitsLicenseThis python package is free software: you can redistribute it or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2 (GPLv2), seelocal copyoronline version.
Package: xarray-stac
Tool to create data cubes using data retrieved from STAC catalogs.UsageTo exemplify the use of xarray-stac, the STAC catalog of the Brazil Data Cube project will be used as a basis. The first step is made with the search of some data in the catalog:importstac.py# getting databdc_stac_service=stac.STAC('http://brazildatacube.dpi.inpe.br/stac/')collection=bdc_stac_service.collection('S2_10_16D_STK-1')items=collection.get_items(filter={'bbox':'-61, 2.8, -60, 1.8','datetime':'2018-08-01/2019-07-31'})Once with the data, you can use thecube_from_stac_collectionfunction to create a data cube with the items collections that comes from the STAC catalog:fromxarray_stac.cubeimportcube_from_stac_collectioncube=cube_from_stac_collection(items['features'][0:2],['NDVI','band08'])NoteThe first parameter represents the list of features and the second the list of bands that need to be in the dimensions of the cube that is being generated
Package: xarray-topo
xarray-topo is a Python package that extendsxarraywith a small set of
topographic tools useful for processing Digital Elevation Models (DEMs) and/or
outputs of Landscape Evolution Models (LEMs).It also providesxarray-simlabcompatible models and re-usable model
components (i.e., processes) for landscape evolution modelling.Warning: this package is currently under heavy development (no stable release yet).DocumentationA draft of documentation is hosted on ReadTheDocs:http://xarray-topo.readthedocs.ioLicense3-clause (“Modified” or “New”) BSD license
seeLicense file.xarray-topo is developed with support from theEarth Surface Process Modellinggroup of the GFZ Helmholtz Centre Potsdam.
Package: xarray-video
Xarray extension for working with video data.This project is in an early stage of development. Please be patient with any bugs. Any contributuons are welcome.MIT licenseDocumentation:https://xarray-video.readthedocs.io.Github:https://github.com/oceanum-io/xarray-videoFeaturesXarray backend to read video into an xarray datasetXarray accessor for time and/or space stacked video DataArraysZarr video codec for efficient compression of video. Up to 100x improvement over blosc for video data.Xarray accessor for video Datasets for writing to zarr using the video codecSimple diagnostic plotting and play functions to view videoUsesAttach coordinates (for example time or location) to the video frames dimensionUtilise Xarray selection functionality for easy subsetting of videoEasily convert video streams and frames to other formats such as netcdf or geotiffStore video in an efficient chunked format within zarrCreate massive lazy access video archives using a zarr backendStore multiple videos (for example stereo camera) in the same Dataset with consistent time and/or spatial coordinates.LimitationsThe library uses [PyAV](https://pyav.org) to read and write to/from video files. It will be limited to the same set of formats and codecs as your PyAV installation.Although video file access and zarr archive access is lazy, once video data is loaded it is in uncompressed uint8 darrays. Trying to do dataset.load on large video files will exhaust your RAM very quickly.The play preview is only intended as a diagnostic tool. It buffers the entire video as an array before display so cannot handle larger arrays. The play preview is also unlikely to play in realtime for larger videos.CreditsThis package was developed byOceanum Numerical, with input from our development partners and contributors.History0.0.1 (2022-12-02)First release on PyPI.
Package: xash
Data science, data analysis, graph visualization, …InstallDevelopment Stage:CheckADR-5on projectxintabout how to usepoetryto manage how to
evolve projects on development stages.Production Stage:This section is under constructionAfter installation tasks:Each of our projects should have abacklog-0001document with task to
execute after a project is installed.  This document must be located in thedocs/source/backlogdirectory.DocumentationTo manage the documentation of this project you must install it locally with
thedocsgroup enabled:poetry install --with docsThis section is under construction
Package: xaspy
Alpha T. N’Diaye
Author-email:gnzng@protonmail.chLicense: MIT
Keywords: xray absorption spectroscopy,xmcd,synchrotron
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
License-File: LICENSE
Package: xata
Python SDK for XataXata is a serverless data platform, based on PostgreSQL. The data platform brings full-text search, vector similarity search, and file/image attachments on top of PostgreSQL. Xata supports also native database branches and a developer workflow that integrates seamlessly with GitHub and platforms like Vercel and Netlify.The Python SDK uses type annotations and requires Python 3.8 or higher.To install, run:pip install xataTo learn more about Xata, visitxata.io.SDK documentationAPI Reference
Package: xatelite
# XaTeLite 🛰️LaTeX over SSH and HTTP. Lets you remotely compile LaTeX and immediately seeyour compiled pdf all remotely.## RequirementsYou need- Flask- pdflatex## InstallationJust install by```python3 -m pip install flaskpython3 -m pip install xatelite```## UsageThe most common use case is ssh-ing into your remote server,starting xatelite, and opening up a web browser to your xatelite latex server.Here's an example: after ssh-ing into your server, run```$ xatelite -f ~/math/pset4/pset4.tex -q -p 5010```This starts an HTTP server on port `5010` and uses `-q` to silence Flask'soutput. Now if you visit your server on port `5010` through a web browser,you'll be presented with your pdf. **Refreshing recompiles the LaTeX file**.If there's a bug in your .tex file (if pdflatex returns a non-zero error code),a log file will be presented instead. Use the log file to debug.## OptionsThe current options can be accessed by `xatelite -h` and are:usage: xatelite.py [-h] [-f LATEX_FILE] [-p PORT] [-q] [-qq]optional arguments:-h, --help            show this help message and exit-f LATEX_FILE, --latex_file LATEX_FILEthe latex file to be compiled and served. If this isnot passed in, the single *.tex file in the workingdirectory will be used.-p PORT, --port PORT  specify which port the webserver will run on-q, --quiet           suppress any Flask output-qq, --qquiet         suppress all output including running message## TODO- [ ] Better debugging options- [ ] Maybe have a relaxed mode that allows errors if a pdf is generated?- [ ] Have a config file with specific pdflatex commands.- [ ] Recommend `xatelite [file] -qq & disown` for non-screen/tmux users.- [ ] Have a `-k/--kill` option to kill servers that can take PID/filename- [ ] Have a `-s/--sessions` option to see PID/filename/ports
Package: xath
xathDeveloper GuideSetup# create conda environment$mambaenvcreate-fenv.yml# update conda environment$mambaenvupdate-nxath--fileenv.ymlInstallpipinstall-e.# install from pypipipinstallxathnbdev# activate conda environment$condaactivatexath# make sure the xath package is installed in development mode$pipinstall-e.# make changes under nbs/ directory# ...# compile to have changes apply to the xath package$nbdev_preparePublishing# publish to pypi$nbdev_pypi# publish to conda$nbdev_conda--build_args'-c conda-forge'$nbdev_conda--mambabuild--build_args'-c conda-forge -c dsm-72'UsageInstallationInstall latest from the GitHubrepository:$pipinstallgit+https://github.com/dsm-72/xath.gitor fromconda$condainstall-cdsm-72xathor frompypi$pipinstallxathDocumentationDocumentation can be found hosted on GitHubrepositorypages. Additionally you can find
package manager specific guidelines oncondaandpypirespectively.