Validation errors
See original GitHub issueI noticed that there isn’t a single call of .validate()
anywhere in the discretize package or testing suite. Perhaps this was overlooked?
I figured this out because I was adding validation checks for MR #114 and I can’t validate any meshes without the following difficult to trace back error (on the master
branch):
import discretize
tens = discretize.TensorMesh([16, 16])
tens.validate()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-2-fc8c65b21a77> in <module>()
1 import discretize
2 tens = discretize.TensorMesh([16, 16])
----> 3 tens.validate()
/Users/bane/anaconda3/envs/disc/lib/python2.7/site-packages/properties/base/base.pyc in validate(self)
409 )
410 elif self._non_validation_error:
--> 411 raise self._non_validation_error #pylint: disable=raising-bad-type
412 return True
413 finally:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Validation errors - Oracle Help Center
Validation errors typically occur when a request is malformed -- usually because a field has not been given the correct value type, or...
Read more >Form Validation Errors - how to track them and what to do ...
1) a user entered an invalid data into a form field, for example, an email without "@" character · 2) a user entered...
Read more >Validation-Errors-Warnings - Research and Development
Validation-Errors-Warnings. The Kuali Research validation tool is useful but does not replace the knowledge and skills of a research administrator.
Read more >Form-Field Validation: The Errors-Only Approach
Error pages for form-field validation are dreadful. You've just filled out 20 form fields, yet you get the same bloated page thrown back...
Read more >ValidationErrors - Angular
Defines the map of errors returned from failed validation checks. type ValidationErrors = { [key: string]: any; };. Resources.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it is a backwards compatibility issue, as at some point you could do this comparison, but they changed it at some point, if I remember right.
I haven’t looked into it in detail, and @rowanc1 or @lheagy are probably better suited to answer that. But at least as a short fix you can probably simply change line 55 from
to
See this dummy example:
Here’s another one with the
TreeMesh
(after fixing line 55 in Base.py as mentioned above)With the following traceback: