<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks for the replies. All is now well!<br>
<br>
I'm thankful that this list is so very patient with ROF's (retired
old fools) struggling to learn a new programmng language.<br>
<br>
<br>
<div class="moz-cite-prefix">On 10/08/2019 10:42 AM, Fabrice Silva
wrote:<br>
</div>
<blockquote
cite="mid:e14bab865d88667ff170b7a15265837ae264b2d3.camel@lma.cnrs-mrs.fr"
type="cite">
<div>Le mardi 08 octobre 2019, Stephen P. Molnar a ?crit :</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px
#729fcf solid;padding-left:1ex">
<blockquote type="cite" style="margin:0 0 0 .8ex;
border-left:2px #729fcf solid;padding-left:1ex">
<pre>data = np.genfromtxt("13-7.log", usecols=(1), dtype=None, </pre>
<pre>skip_header=27, skip_footer=1, encoding=None)</pre>
<pre>print(data)</pre>
<pre>[...]</pre>
</blockquote>
<pre>
</pre>
<blockquote type="cite" style="margin:0 0 0 .8ex;
border-left:2px #729fcf solid;padding-left:1ex">
<pre>['-8.839713733' '-8.743377250' '-8.151051167' '-8.090452911'</pre>
<pre>? '-7.967494477' '-7.854890056' '-7.757417879' '-7.741557490'</pre>
<pre>? '-7.643885488' '-7.611595767' '-7.507605524' '-7.413920814'</pre>
<pre>? '-7.389408331' '-7.384446364' '-7.374206276' '-7.368808179'</pre>
<pre>? '-7.346641418' '-7.325037898' '-7.309614787' '-7.113209147']</pre>
</blockquote>
</blockquote>
<div><br>
</div>
<div>Hi,</div>
<div>Note that your <b>data</b> array is made of strings and not
floats.</div>
<div>The default value of the <b>dtype</b> argument is <b>float</b>,
which you override by <b>None.</b></div>
<div>Remove the 'dtype=None' part to correctly load data</div>
<div><br>
</div>
<div>You then have no problem to save your data with the format
you want.</div>
<div><br>
</div>
<div>Fabrice</div>
<div><br>
</div>
<div>PS : be aware that [data] is a 2D row array, that will end up
inlined with command</div>
<div><span style="caret-color: rgb(32, 74, 135); color: rgb(32,
74, 135); font-family: "Fira Mono";">np.savetxt('13-7',
[data], fmt='%15.9f', header='13-7')</span></div>
<div>
<div>Remove the?bracket for a one-per-line formatted output</div>
<div><span style="caret-color: rgb(32, 74, 135); color: rgb(32,
74, 135); font-family: "Fira Mono";">np.savetxt('13-7',
data, fmt='%15.9f', header='13-7')</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
NumPy-Discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:NumPy-Discussion@python.org">NumPy-Discussion@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/numpy-discussion">https://mail.python.org/mailman/listinfo/numpy-discussion</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Stephen P. Molnar, Ph.D.
<a class="moz-txt-link-abbreviated" href="http://www.molecular-modeling.net">www.molecular-modeling.net</a>
614.312.7528 (c)
Skype: smolnar1
</pre>
</body>
</html>