Skip to content

Commit

Permalink
Merge pull request #36 from dioph/gmean
Browse files Browse the repository at this point in the history
provides own gmean implementation
  • Loading branch information
fmndantas committed Apr 5, 2020
2 parents 77b2a86 + 41fc16a commit 183c4ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions elegant/core.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import networkx as nx
import numpy as np
from scipy.stats.mstats import gmean

from .methods import newton_raphson, short


def gmean(arr):
return np.prod(arr) ** (1 / len(arr))


NAME = "Elegant"

CORR = np.exp(-.25)
Expand All @@ -23,8 +27,6 @@
SYMBOL_TO_PY = {STAR_SYMBOL: STAR, EARTH_SYMBOL: EARTH, DELTA_SYMBOL: DELTA}


# ToDo defasagem dos trafos

class Bus(object):
def __init__(self, bus_id, v=1.0, delta=0.0, pg=0.0, qg=0.0, pl=0.0, ql=0.0,
xd=np.inf, iTPG=None, iSLG=None, iDLGb=None, iDLGc=None, iLL=None,
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ networkx
numpy
pylatex
PyQt5
scipy
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
url="https://github.com/dioph/elegant",
packages=["elegant"],
entry_points={"console_scripts": ['elegant=elegant.interface:main']},
install_requires=["networkx", "numpy", "scipy"],
install_requires=["networkx", "numpy"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
Expand Down

0 comments on commit 183c4ff

Please sign in to comment.