Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import random
- import numpy as np
- np.set_printoptions(threshold='nan')
- from shogun.Classifier import *
- def main():
- raw_labels = [random.choice([0.0, 1.0]) for r in range(100)]
- test_labels = Labels(np.array(raw_labels, dtype=np.double))
- if __name__ == "__main__":
- main()
- ################################################################################
- Output:
- > python eval.py
- Traceback (most recent call last):
- File "eval.py", line 24, in <module>
- main()
- File "eval.py", line 21, in main
- test_labels = Labels(np.array(raw_labels, dtype=np.double))
- TypeError: Cannot create new instances of type 'Labels'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement