https://github.com/aadya940/numpyai

A Natural Language Interface to the Numpy Library using LLMs.

https://github.com/aadya940/numpyai

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

ai data-analysis data-science library llm machine-learning numpy python
Last synced: 6 months ago · JSON representation

Repository

A Natural Language Interface to the Numpy Library using LLMs.

Basic Info
Statistics
  • Stars: 9
  • Watchers: 1
  • Forks: 1
  • Open Issues: 2
  • Releases: 1
Topics
ai data-analysis data-science library llm machine-learning numpy python
Created 11 months ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

logo

NumpyAI

A Natural Language Interface for NumPy powered by LLMs. Empowering mindful data analysis using Generative AI.

About NumpyAI

NumpyAI enables seamless interaction with NumPy using natural language queries, making numerical computing more intuitive and efficient.

Key Features:

  • Writes NumPy code for you based on your natural language queries.
  • Know what data-analysis steps to apply on your data using numpyai.Diagnosis.
  • Talk to multiple arrays using numpyai.NumpyAISession.
  • Checks the validity of the generated code.
  • Unit tests the code before returning the final-output.
  • Full transparency, know what code was executed by the LLM using the verbose=True flag.
  • Supports frameworks like sklearn and matplotlib for basic tasks.
  • Interactive debugging and re-tries.
  • NumPy compatible.

Installation

sh pip install numpyai

Installation from Source

Clone the project then:

sh cd numpyai/ pip install -r requirements.txt pip install .

Setup

Windows sh set GOOGLE_API_KEY=...

Linux sh export GOOGLE_API_KEY=...

Usage Example

Single Array

```python import numpyai as npi import numpy as np

Ensure GOOGLEAPIKEY environment variable is set.

Create an array instance

data = [[1, 2, 3, 4, 5, np.nan], [np.nan, 3, 5, 3.1415, 2, 2]] arr = npi.array(data)

Query NumPyAI with natural language

print(arr.chat("Compute the height and width of the image using NumPy.")) # Expected output: (2, 6) ```

Multiple Arrays

```python import numpyai as npi import numpy as np

arr1 = np.array([[1, 2, 3], [4, 5, 6]]) arr2 = np.random.random((2, 3))

sess = npi.NumpyAISession([arr1, arr2]) imputed_array = sess.chat("Impute the first array with the mean of the second array.") ```

Diagnosis

```python import numpyai as npi import numpy as np

arr1 = np.array([[1, 2, 3], [4, 5, 6]]) arr2 = np.random.random((2, 3))

sess = npi.NumpyAISession([arr1, arr2]) diag = npi.Diagnosis(sess) print(diag.steps(task="Tell me the exact and pithy steps to analyse and select which ML model to use for this data. There should be no more than 7 steps")) ```

Supported LLM Vendors

  • Google Gemini
  • OpenAI
  • Anthropic

Contributing Guidelines

  • Apply the black formatter.
  • The code should be well documented and be rendered in the docs.
  • For testing, add it in the examples/all_functionality.ipynb notebook.
  • Ensure backward compatibility.

Thank you and looking forward to seeing you contribute to NumpyAI :) !

Owner

  • Name: Aadya Chinubhai
  • Login: aadya940
  • Kind: user

UG. Student at Ahmedabad University.

GitHub Events

Total
  • Issues event: 11
  • Watch event: 16
  • Delete event: 1
  • Push event: 52
  • Fork event: 2
  • Create event: 3
Last Year
  • Issues event: 11
  • Watch event: 16
  • Delete event: 1
  • Push event: 52
  • Fork event: 2
  • Create event: 3

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • aadya940 (6)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels