TransWikia.com

What is "SwarmPackagePy.cso.cso at 0x187cf21e340"

Data Science Asked on July 4, 2021

def rosen(x):
"""The Rosenbrock function"""
return sum(100.0*(x[1:]-x[:-1]**2.0)**2.0 + (1-x[:-1])**2.0)

from SwarmPackagePy import cso

cso(1,rosen,10,1000,2,10000,pa=0.25,nest=100)

Out[41]: <SwarmPackagePy.cso.cso at 0x187cf21e340>

How can I access outputs of cso function? There aren’t docs on this.

One Answer

This is not really a "data science" question but more of a "(Python) programming" question. You can find more comprehensive answers at stackoverflow.

Other than that, if you go to the source code of SwarmPackagePy.cso (I was not able to find any documentation), you will see that it creates an instance (object) of the cso class and what you get when you print this object is the location or address of this object in the memory.

Answered by haci on July 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP