-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discretize a continuous space #84
base: main
Are you sure you want to change the base?
Conversation
1.9.6 Test ReportGlobal Parameters
Results
Test Detailscubesderivative1d-chderivative_2degdipoleException on response 1non-broadcastable output operand with shape (3,1) doesn't match the broadcast shape (3,3) Exception on response 2unsupported operand type(s) for -: 'float' and 'NoneType' Exception on response 3unsupported operand type(s) for -: 'float' and 'NoneType' Exception on response 4unsupported operand type(s) for -: 'float' and 'NoneType' discretizeException on response 0list indices must be integers or slices, not tuple Exception on response 1list indices must be integers or slices, not tuple Exception on response 2list indices must be integers or slices, not tuple Exception on response 3list indices must be integers or slices, not tuple Exception on response 4list indices must be integers or slices, not float hydrophobic_resException on response 3invalid syntax (<string>, line 23) integraltrapException on response 1invalid syntax (<string>, line 19) invert_matrixException on response 1invalid syntax (<string>, line 23) mapemapping_operatorException on response 0invalid syntax (<string>, line 19) Exception on response 1invalid syntax (<string>, line 20) Exception on response 2invalid syntax (<string>, line 19) Exception on response 3[Errno 2] No such file or directory: 'water.gro' Exception on response 4invalid syntax (<string>, line 19) matrix_factorialException on response 0only integer scalar arrays can be converted to a scalar index Exception on response 1The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() Exception on response 4EOF while scanning triple-quoted string literal (<string>, line 31) pair_wiseException on response 0unsupported operand type(s) for /: 'NoneType' and 'int' Exception on response 1invalid syntax (<string>, line 23) Exception on response 2unsupported operand type(s) for /: 'NoneType' and 'int' Exception on response 3name 'alpha_carbon_coord' is not defined Exception on response 4invalid syntax (<string>, line 23) piException on response 1unsupported operand type(s) for -: 'NoneType' and 'float' Exception on response 2unsupported operand type(s) for -: 'NoneType' and 'float' Exception on response 3unsupported operand type(s) for -: 'NoneType' and 'float' Exception on response 4unsupported operand type(s) for -: 'NoneType' and 'float' random_walkException on response 0unsupported operand type(s) for *: 'NoneType' and 'NoneType' Exception on response 1expected an indented block (<string>, line 22) Exception on response 2unsupported operand type(s) for *: 'NoneType' and 'NoneType' Exception on response 3invalid syntax (<string>, line 21) remove-water-chException on response 0'NoneType' object has no attribute 'n_atoms' Exception on response 1'NoneType' object has no attribute 'n_atoms' Exception on response 2'NoneType' object has no attribute 'n_atoms' Exception on response 3'NoneType' object has no attribute 'n_atoms' Exception on response 4'Trajectory' object has no attribute 'rest' remove-waterException on response 0invalid syntax (<string>, line 20) Exception on response 1'NoneType' object has no attribute 'n_atoms' Exception on response 2'NoneType' object has no attribute 'n_atoms' Exception on response 3'NoneType' object has no attribute 'n_atoms' Exception on response 4invalid syntax (<string>, line 18) rmse-chrmserogException on response 1name 'radius_of_gy' is not defined Exception on response 2name 'radius' is not defined Exception on response 3name 'radius' is not defined Exception on response 4name 'radius' is not defined select_framesException on response 0invalid syntax (<string>, line 20) sequencesmoke |
1.9.6 Test ReportGlobal Parameters
Results
Test Detailscubesderivative1d-chException on response 3invalid syntax (<string>, line 21) derivative_2degdipoleException on response 0unsupported operand type(s) for -: 'float' and 'NoneType' Exception on response 1unsupported operand type(s) for -: 'float' and 'NoneType' Exception on response 2unsupported operand type(s) for -: 'float' and 'NoneType' Exception on response 3unsupported operand type(s) for -: 'float' and 'NoneType' Exception on response 4unsupported operand type(s) for -: 'float' and 'NoneType' discretizeException on response 0invalid syntax (<string>, line 18) Exception on response 1can't multiply sequence by non-int of type 'float' Exception on response 2unsupported operand type(s) for /: 'float' and 'list' Exception on response 3unsupported operand type(s) for /: 'float' and 'list' Exception on response 4invalid syntax (<string>, line 18) hydrophobic_resException on response 1invalid syntax (<string>, line 23) Exception on response 4invalid syntax (<string>, line 23) integraltrapinvert_matrixmapemapping_operatorException on response 0expected an indented block (<string>, line 19) Exception on response 1expected an indented block (<string>, line 21) Exception on response 2expected an indented block (<string>, line 20) Exception on response 3invalid syntax (<string>, line 19) Exception on response 4invalid syntax (<string>, line 18) matrix_factorialException on response 4EOF while scanning triple-quoted string literal (<string>, line 31) pair_wiseException on response 0name 'n' is not defined Exception on response 1unsupported operand type(s) for /: 'NoneType' and 'int' Exception on response 2name 'itertools' is not defined Exception on response 3invalid syntax (<string>, line 22) Exception on response 4unsupported operand type(s) for /: 'NoneType' and 'int' piException on response 1unsupported operand type(s) for -: 'NoneType' and 'float' random_walkException on response 0unsupported operand type(s) for /: 'float' and 'module' Exception on response 1expected an indented block (<string>, line 22) Exception on response 3unsupported operand type(s) for *: 'NoneType' and 'NoneType' Exception on response 4invalid syntax (<string>, line 21) remove-water-chException on response 0'NoneType' object has no attribute 'n_atoms' Exception on response 1'Trajectory' object has no attribute 'atom' Exception on response 2'Trajectory' object has no attribute 'rest' Exception on response 3EOL while scanning string literal (<string>, line 17) Exception on response 4'NoneType' object has no attribute 'n_atoms' remove-waterException on response 0invalid syntax (<string>, line 20) Exception on response 1name 'tra' is not defined Exception on response 2'NoneType' object has no attribute 'n_atoms' Exception on response 3EOL while scanning string literal (<string>, line 17) rmse-chrmserogException on response 0name 'radius' is not defined Exception on response 1name 'radius' is not defined select_framessequencesmoke |
import numpy as np | ||
|
||
def discretize(location, grid): | ||
return tuple(int(np.digitize(l, g)) for l, g in zip(location, grid)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Is the grid necessarily to be
int
? If not, the test is not exhausted. Otherwise should modify the description to specify the grid isint
. - Take a look at this https://numpy.org/doc/stable/reference/generated/numpy.digitize.html. Maybe should specify
right
argument. Consider the edge case that the location falls exactly on grid point, and the grid array is increasing/decreasing.
No description provided.