<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm using type 169 for make some calculations but when i use external package as numpy don't work well, i paste my code below:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span>
<div>import TRNSYSpy as TRNSYS<br>
</div>
<div>import numpy as np<br>
</div>
<div><br>
</div>
<div>def PythonExample():<br>
</div>
<div>   <br>
</div>
<div>    DNI = TRNSYS.getInputValue(3)<br>
</div>
<div>   <br>
</div>
<div><br>
</div>
<div>    Pv_out= np.zeros(2)<br>
</div>
<div>    Tcell= np.zeros(2)<br>
</div>
<div><br>
</div>
<div>   <br>
</div>
<div>    for i in range(1,3):<br>
</div>
<div>        Tcell[i-1]=TRNSYS.getInputValue(i)<br>
</div>
<div>    <br>
</div>
<div>    <br>
</div>
<div>    <br>
</div>
<div>        Pv_out[i-1]=(-20.25391+0.84583*Tcell[i-1]+0.0667*DNI-0.00961*Tcell[i-1]**2 +0.00002*DNI**2)<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>    out1 = Pv_out[0]<br>
</div>
<div>    out2 = Pv_out[1]<br>
</div>
<div><br>
</div>
<div>    TRNSYS.setOutputValue(1,out1)<br>
</div>
<div>    TRNSYS.setOutputValue(2,out2)    <br>
</div>
<div>   <br>
</div>
<div>    return<br>
</div>
<span></span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards</div>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img alt="" width="46" height="29" style="width: 46px; height: 29px;" src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png"></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">
Libre de virus. <a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color: #4453ea;">
www.avg.com</a> </td>
</tr>
</tbody>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
</body>
</html>