Skip to content
Permalink
Browse files
fix: preserve dtypes across paramspace (#1578)
* Use itertuples instead of iterrows to preserve dtypes across columns

* Updated tests for paramspace to include dtype check

* black formatting
  • Loading branch information
SichongP committed Apr 21, 2022
1 parent 667ee86 commit 70ce6a0feb8572ddcf888c3d377d631ea4a24370
Show file tree
Hide file tree
Showing 50 changed files with 20 additions and 20 deletions.
@@ -693,10 +693,10 @@ def instance_patterns(self):
self.pattern.format(
*(
self.param_sep.join(("{}", "{}")).format(name, value)
for name, value in row.items()
for name, value in row._asdict().items()
)
)
for index, row in self.dataframe.iterrows()
for row in self.dataframe.itertuples(index=False)
)

def instance(self, wildcards):

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 1, 'beta': 0.1, 'gamma': 0.99}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 2, 'beta': 0.0, 'gamma': 3.9}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 1, 'beta': 0.1, 'gamma': 0.99}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 2, 'beta': 0.0, 'gamma': 3.9}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 1, 'beta': 0.1, 'gamma': 0.99}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 2, 'beta': 0.0, 'gamma': 3.9}

This file was deleted.

@@ -0,0 +1 @@
{'beta': 0.0, 'gamma': 3.9, 'alpha': 2}

This file was deleted.

@@ -0,0 +1 @@
{'beta': 0.1, 'gamma': 0.99, 'alpha': 1}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 1, 'gamma': 0.99, 'beta': 0.1}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 2, 'gamma': 3.9, 'beta': 0.0}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 1, 'beta': 0.1, 'gamma': 0.99}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 2, 'beta': 0.0, 'gamma': 3.9}

This file was deleted.

@@ -0,0 +1 @@
{'beta': 0.0, 'gamma': 3.9, 'alpha': 2}

This file was deleted.

@@ -0,0 +1 @@
{'beta': 0.1, 'gamma': 0.99, 'alpha': 1}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 1, 'beta': 0.1, 'gamma': 0.99}

This file was deleted.

@@ -0,0 +1 @@
{'alpha': 2, 'beta': 0.0, 'gamma': 3.9}
@@ -1,3 +1,3 @@
alpha beta gamma
1.0 0.1 0.99
2.0 0.0 3.9
1 0.1 0.99
2 0.0 3.9

0 comments on commit 70ce6a0

Please sign in to comment.