Skip to content

Commit

Permalink
use newer exmex due to operator fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed Jul 30, 2024
1 parent f12f8b7 commit 44cbac8
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rormula-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rormula-rs"
version = "0.1.8"
version = "0.1.9"
edition = "2021"

[dependencies]
exmex = "0.20.2"
exmex = "0.20.3"
numpy = "0.21.0"

[features]
Expand Down
2 changes: 1 addition & 1 deletion rormula/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rormula"
version = "0.1.8"
version = "0.1.9"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion rormula/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "maturin"
[project]
name = "rormula"
requires-python = ">=3.7"
version = "0.1.8"
version = "0.1.9"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
Expand Down
10 changes: 10 additions & 0 deletions rormula/rormula/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from collections.abc import Sequence
from typing import List, NamedTuple, Tuple, Union
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -96,3 +97,12 @@ def unparse(self) -> str:

def has_row_change_op(self) -> bool:
return self.ror.has_row_change_op()

def operator_reprs(self) -> Sequence[str]:
return self.ror.operator_reprs()

def binary_reprs(self) -> Sequence[str]:
return self.ror.operator_reprs()

def unary_reprs(self) -> Sequence[str]:
return self.ror.operator_reprs()
4 changes: 4 additions & 0 deletions rormula/rormula/rormula.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ def eval_wilkinson(
class Arithmetic:
def has_row_change_op(self) -> bool: ...
def unparse(self) -> str: ...
def operator_reprs(self) -> Sequence[str]: ...
def binary_reprs(self) -> Sequence[str]: ...
def unary_reprs(self) -> Sequence[str]: ...

def parse_arithmetic(s: str) -> Arithmetic: ...
def eval_arithmetic(
ror: Arithmetic,
numerical_data: np.ndarray,
numerical_cols: Sequence[str],
) -> np.ndarray: ...

9 changes: 9 additions & 0 deletions rormula/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ impl Arithmetic {
pub fn unparse(&self) -> PyResult<String> {
Ok(self.expr.unparse().to_string())
}
pub fn operator_reprs(&self) -> PyResult<Vec<String>> {
Ok(self.expr.operator_reprs().to_vec())
}
pub fn unary_reprs(&self) -> PyResult<Vec<String>> {
Ok(self.expr.unary_reprs().to_vec())
}
pub fn binary_reprs(&self) -> PyResult<Vec<String>> {
Ok(self.expr.binary_reprs().to_vec())
}
}

#[derive(Debug)]
Expand Down

0 comments on commit 44cbac8

Please # to comment.