1

Pygmo 2.1 haven't SPEA2 Algorithm implemented yet?

I'm asking because SPEA2 looks fully implemented on Pygmo documentation

nsga2 algorithm it's ok.

Steps to reproduce error:

import pygmo as pg <br/>
algo = pg.algorithm(pg.spea2(archive_size = 0))

I expect get no errors, but i am getting

AttributeError: module 'pygmo' has no attribute 'spea2'
Omkar
  • 3,253
  • 3
  • 20
  • 36
licensed
  • 11
  • 2

1 Answers1

0

I'm looking at the example documentation, I think this could work:

from PyGMO import *
alg = algorithm.spea2(archive_size = 0)

You're trying to access spea2 from the base module whereas it is a part of the algorithms sub-module.

razdi
  • 1,388
  • 15
  • 21
  • I appreciate your answer, but this code doesn't work, same error: AttributeError: type object 'algorithm' has no attribute 'spea2' I had read entire documentation, but i think it's not implemented yet. – licensed Jun 12 '19 at 14:34
  • I really doubt that. I can see it in the [documentation](https://esa.github.io/pygmo/documentation/algorithms.html#PyGMO.algorithm.spea2) that it has indeed been implemented – razdi Jun 12 '19 at 23:04