Geometry.Net - the online learning center
Home  - Computer - Loadtxt
e99.com Bookstore
  
Images 
Newsgroups
Page 1     1-20 of 97    1  | 2  | 3  | 4  | 5  | Next 20

         Loadtxt:     more detail

1. Numpy.loadtxt — NumPy V2.0.dev Manual (DRAFT)
numpy.loadtxt(fname, dtype= type float , comments= , delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False)¶
http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html
Navigation
numpy.loadtxt
numpy. loadtxt fname comments='#' delimiter=None converters=None skiprows=0 usecols=None unpack=False
Load data from a text file. Each row in the text file must have the same number of values. Parameters : fname : file or str File or filename to read. If the filename extension is .gz or , the file is first decompressed. dtype : data-type, optional Data-type of the resulting array; default: float. If this is a record data-type, the resulting array will be 1-dimensional, and each row will be interpreted as an element of the array. In this case, the number of columns used must match the number of fields in the data-type. comments : str, optional delimiter : str, optional The string used to separate values. By default, this is any whitespace. converters : dict, optional A dictionary mapping column number to a function that will convert that column to a float. E.g., if column is a date string: converters . Converters can also be used to provide a default value for missing data: converters lambda s: float(s or . Default: None. skiprows : int, optional

2. Numpy Example List With Doc -
loadtxt() log() log10() log1p() log2() logical_and() logical_not() logical_or() logical_xor() logspace() lookfor() lstsq() mat() matrix() max() maximum() maximum_sctype()
http://www.scipy.org/Numpy_Example_List_With_Doc
Search:
Wiki
Page
  • Immutable Page Info Attachments More Actions: Raw Text Print View Render as Docbook Delete Cache Check Spelling Like Pages Local Site Map Rename Page Delete Page My Pages Subscribe User Remove Spam Package Pages
  • Numpy Example List With Doc
This is an auto-generated version of Numpy Example List with added documentation from doc strings and arguments specification for methods and functions of Numpy 1.2.1. Please do not edit this page directly. To update this page just follow the instructions
from numpy import a arange a a reshape print a a # same as a[:,:,0] array a # same as a[1:,:,:] or just a[1:] array See also: newaxis
from numpy import a array a # indices start by zero a # last row array a # subarray array i array # array of indices for the first axis j array # array of indices for the second axis a i j array a a # boolean indexing array array True False True False # boolean row selector a array array False True True False True # boolean column selector a array See also: newaxis indices nonzero where ... slice
T
ndarray .T Examples array([[ 1., 3.]

3. Help Formatting In Numpy.loadtxt - Python
I need to read in a large amount of data from a csv file into arrays. I am using Numpy as I need to later manipulate and plot the results. I have decided to use numpy.loadtxt as
http://www.daniweb.com/forums/thread245873.html
/** * vBulletin 3.8.2 CSS * Style: 'Software Development'; Style ID: 6 */ @import url("/forums/clientscript/vbulletin_css/style-1ac307d6-00006.css"); @import url("/rxrimages/danicss.css"); Top Members by Rank

4. NumPy 1.5.0 Beta 2 - Changelog - Softpedia
905 numpy.loadtxt usecols argument no longer accepts numpy arrays 906 Deepcopy does not copy _mask attribute of a masked array object
http://mac.softpedia.com/progChangelog/NumPy-Changelog-37788.html

5. CreativeCOW
_root.preloader.loadtxt.text = percentageOutput + % if (loadedBytes!=totalBytes) {gotoAndPlay(2);} else {gotoAndStop(5);} then on frame 2 I have this
http://forums.creativecow.net/readpost/190/858491
click here to skip this sponsored message click here to skip this sponsored message click here to skip this sponsored message click here to skip this sponsored message

6. Numpy.loadtxt — NumPy V1.4 Manual (DRAFT)
numpy.loadtxt(fname, dtype= type float , comments= , delimiter=None
http://docs.scipy.org/doc/numpy-1.4.x/reference/generated/numpy.loadtxt.html
Navigation
numpy.loadtxt
numpy. loadtxt fname comments='#' delimiter=None converters=None skiprows=0 usecols=None unpack=False
Load data from a text file. Each row in the text file must have the same number of values. Parameters: fname : file or str File or filename to read. If the filename extension is .gz or , the file is first decompressed. dtype : dtype, optional Data type of the resulting array. If this is a record data-type, the resulting array will be 1-dimensional, and each row will be interpreted as an element of the array. In this case, the number of columns used must match the number of fields in the data-type. comments : str, optional The character used to indicate the start of a comment. delimiter : str, optional The string used to separate values. By default, this is any whitespace. converters : dict, optional A dictionary mapping column number to a function that will convert that column to a float. E.g., if column is a date string: converters . Converters can also be used to provide a default value for missing data: converters lambda s: float(s or skiprows : int, optional

7. [Numpy-discussion] Loadtxt And Genfromtxt
I am new to python/numpy/scipy and new to this list. I recently migrated over from using Octave and am very impressed so far! Recently I needed to load data from a text file and
http://www.mail-archive.com/numpy-discussion@scipy.org/msg23572.html
numpy-discussion
[Numpy-discussion] loadtxt and genfromtxt
Jonathan Stickel
Wed, 10 Feb 2010 09:37:07 -0800 http://mail.scipy.org/mailman/listinfo/numpy-discussion

8. Speed Up A Numpy Code With Huge Array
* V=numpy.loadtxt(pathV) * VTOT = V0 * L3 = V1 * print 'using ' + vtet else * NN= * B=0,0,0,0 * for i in range(len(N)) * * * * B0 = Ni.label
http://www.velocityreviews.com/forums/t724028-speed-up-a-numpy-code-with-huge-ar

Velocity Reviews
Newsgroups Python speed up a numpy code with huge array User Name Remember Me? Password Register FAQ Members List Calendar ... Mark Forums Read
Python - speed up a numpy code with huge array
Thread Tools Search this Thread 05-25-2010, 08:05 PM Alexzive
Posts: n/a speed up a numpy code with huge array Hello Pythonguys!
is there a way to improve the performance of the attached code ? it
takes about 5 h on a dual-core (using only one core) when len(V)
~1MIL. V is an array which is supposed to store all the volumes of
tetrahedral elements of a grid whose coord. are stored in NN (accessed
Thanks in advance!
Alex
print 'start ' + nameodb
#path = '/windows/D/SIM-MM/3D/E_ortho/' + nameodb + '.odb' path = pt + nameodb + '.odb' odb = openOdb(path) N = odb.rootAssembly.instances['PART-1-1'].nodes if loadV==1: pathV=pt+vtet V=numpy.loadtxt(pathV) VTOT = V[0] L3 = V[1] print 'using ' + vtet else: NN=[] B=[0,0,0,0] for i in range(len(N)): B[0] = N[i].label B[1] = N[i].coordinates[0]

9. Using Numpy Dtype With Loadtxt « Physicsnlinux
Mar 3, 2010 then give this as input to loadtxt to load the file and create the array. No Responses Yet to “using numpy dtype with loadtxt”
http://physicsnlinux.wordpress.com/2010/03/03/using-numpy-dtype-with-loadtxt/
physicsnlinux
using numpy dtype with loadtxt
#filename start end
fdsafda.fits 23143214 23143214
safdsafafds.fits 21423 23423432
you can use dtype to create a custom array, which is very flexible as you can work by row or columns with strings and floats in the same array:
[I tried also using np.str instead of S100 without success, anyone knows why?]
then give this as input to loadtxt to load the file and create the array.
a = np.loadtxt(open('yourfile.txt'),dtype=dt)
so each element is:
('dsafsadfsadf.fits', 1.6287776249537126e+18, 1.6290301584937428e+18)
but you can get the array of start or end times using:
a['start'] Filed under: linux numpy python Leave a ... Trackback Address
  • Leave a Comment
  • Leave a Reply
    Click here to cancel reply. Name (required) E-mail (required) Website Notify me of follow-up comments via email. Subscribe by email to this site

    10. #905 (numpy.loadtxt Usecols Argument No Longer Accepts Numpy Arrays) – NumPy
    t appears that the usecols argument to loadtxt no longer accepts numpy arrays from StringIO import StringIO text = StringIO('1 2 3\n4 5 6\n') data = np.loadtxt(text, usecols=np
    http://projects.scipy.org/numpy/ticket/905
    Search:
    Context Navigation
    Ticket #905 (closed defect: fixed)
    Opened 2 years ago Last modified 2 years ago
    numpy.loadtxt usecols argument no longer accepts numpy arrays
    Reported by: rmay Owned by: somebody Priority: normal Milestone: Component: numpy.lib Version: Keywords: patch Cc:
    Description
    t appears that the usecols argument to loadtxt no longer accepts numpy arrays: ValueError? Traceback (most recent call last) /usr/lib64/python2.5/site-packages/numpy/lib/io.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack) 326 327 dtype_types = flatten_dtype(dtype) ValueError? array([[ 2., 3.], Before the fix and refactoring of loadtxt in 1.1.1, converting to a list was not necessary. I think the assumptions just kind of cropped in (exploiting certain list functionality like list.find for ease of code). I've attached a simple patch against HEAD that does the obvious fix and converts usecols to a list if it's not None. This should allow almost any iterable (including tuples, which are also currently broken but used in the docstring) to be passed in to usecols.

    11. Hidden Markov Model - Python - Snipplr Social Snippet Repository
    Compute the unconditional probability for the states of a data = np. loadtxt ('test_data.txt',
    http://snipplr.com/view/28065/hidden-markov-model/

    12. Re: [Numpy-discussion] A Bug In Loadtxt And How To Convert A String Arra
    Re Numpydiscussion A bug in loadtxt and how to convert a string array (hex data) to decimal? frank wang Thu, 18 Sep 2008 150118 -0700
    http://www.mail-archive.com/numpy-discussion@scipy.org/msg12619.html
    numpy-discussion
    Re: [Numpy-discussion] A bug in loadtxt and how to convert a string array (hex data) to decimal?
    frank wang
    Thu, 18 Sep 2008 15:01:18 -0700 http://projects.scipy.org/mailman/listinfo/numpy-discussion http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/ _ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

    13. Physicsnlinux
    parallel computing the python way; quaternions for python; change permission recursively to folders only; aptitude search ‘and’ using numpy dtype with loadtxt
    http://physicsnlinux.wordpress.com/
    physicsnlinux
    gnome alt f2 popup launcher
    gnome-panel-control run-dialog
    Filed under: linux ubuntu Leave a Comment ...
    switch to interactive backend with ipython -pylab
    objective:
  • when running ipython without pylab or executing scripts you want to use an image matplotlib backend like Agg just when calling ipython -pylab you want to use an interactive backend like GTKAgg or TKAgg

  • Filed under: python Leave a Comment
    numpy dtypes and fits keywords
    bool: 'L',
    uint8: 'B',
    int16: 'I',
    int32: 'J',
    int64: 'K',
    float32: 'E',
    float64: 'D',
    complex64: 'C',
    complex128: 'M' Filed under: numpy python Leave a Comment ...
    count hits with numpy
    I have an array where I record hits a=np.zeros(5) and an array with the indices of the hits, for example I have 2 hits on index 2 hits=np.array([2,2]) so I want to increase index 2 of a by 2 Filed under: numpy python Leave a Comment ...
    change column name in a fits with pyfits
    no way to change it manipulating the dtype of the data array. a=pyfits.open('filename.fits') a[1].header.update('TTYPE1','newname')

    14. Loadtxt - Swartz Center For Computational Neuroscience
    loadtxt, Load ascii text file into numeric or cell arrays See the matlab file loadtxt.m (may require other functions) Back to functions.
    http://sccn.ucsd.edu/eeglab/allfunctions/loadtxt.html
    LOADTXT Load ascii text file into numeric or cell arrays
    Usage: >> array = loadtxt( filename, 'key', 'val' ...);
    Inputs: filename name of the input file Optional inputs 'skipline' 'convert' 'delim' 'verbose' 'nlines' integer
    Outputs:
    array cell array. If the option 'force' is given, the function retrun a numeric array.
    Notes: 1) Since it uses cell arrays, the function can handle text input.
    The function reads each token and then try to convert it to a
    number. If the conversion is unsucessfull, the string itself
    is included in the array.
    2) The function adds empty entries for rows that contains
    fewer columns than others.
    Author: Arnaud Delorme, CNL / Salk Institute, 29 March 2002 See the matlab file loadtxt.m (may require other functions) Back to functions

    15. Touchcomic.googlecode.com
    loadtxt() def loadtxt() global filenm. global drive_letter,drive_folder. z=None. tf= files=map(unicode,os.listdir(drive_letter+ \\ +drive_folder)
    http://touchcomic.googlecode.com/files/txt_convertor.py

    16. Question About Arrays - Python
    The numpy.loadtxt() call is not right because of your from..import form, but I suspect that's an artifact of repeated tries. Just loadtxt(), but that doesn't work either.
    http://www.daniweb.com/forums/thread90745.html
    /** * vBulletin 3.8.2 CSS * Style: 'Software Development'; Style ID: 6 */ @import url("/forums/clientscript/vbulletin_css/style-1ac307d6-00006.css"); @import url("/rxrimages/danicss.css"); Top Members by Rank
    • Join DaniWeb Member Log In Editorial ... Python Ad: tweetmeme_source = 'DaniWeb'; tweetmeme_service = 'bit.ly'; tweetmeme_style = 'compact'; tweetmeme_url = 'http://www.daniweb.com/forums/thread90745.html';
      • Python Discussion Thread Unsolved Views:
      Similar Threads Permalink Sep 25th, 2007
      question about arrays
      alright, so i'm trying to import text from a file into an array so that I have the ability to edit data, find certain functions, etc.
      This is currently what my program looks like....(I haven't gotten very far)
      from scipy import *
      from numpy import *
      def Radiograph_data:
      try:
      file('c:/users/ross/desktop/radiograph_data.txt') #checks desktop for file
      except IOerror, e:
      e = urlopen('http://www.u.arizona.edu/~erdmann/mse350/radiograph_data.txt') #downloads file from internet

    17. User List For Matplotlib - A Matlab Compatible Plot Library For Numerical Python
    x=np.reshape(np.loadtxt('PR1'),15000) y=np.reshape(np.loadtxt('PR2'),15000) z=np.reshape(np.loadtxt('PR3'),15000) ax.scatter(x,y,z, marker='o')
    http://blog.gmane.org/gmane.comp.python.matplotlib.general
    User list for matplotlib - a matlab compatible plot library for numerical python headers Nikolaus Rath 30 Oct 22:16
    Setting tick labels for matshow
    Nikolaus@...
    2010-10-30 20:16:41 GMT
    »Time flies like an arrow, fruit flies like a Banana.« (Continue reading)
    Permalink
    Reply 0 comments ... Daniel Hyams 30 Oct 20:14
    my duel with the legend is over. I won. :)
    dhyams@...
    2010-10-30 18:14:18 GMT
    Daniel Hyams dhyams@... (Continue reading)
    Permalink
    Reply ... John 30 Oct 11:41
    netcdf4-python usage, NetCDFFile
    washakie@...
    2010-10-30 09:41:57 GMT
    http://p.sf.net/sfu/nokia-dev2dev
    Permalink Reply 3 comments ... Paul Ivanov 30 Oct 07:16
    Re: how to get legend size, try #2.
    2010-10-30 05:16:33 GMT
    (Continue reading)

    Permalink
    Reply 1 comment ... John 30 Oct 02:04
    help creating a netcdf file with an irregular grid projection (stereographic)
    washakie@... 2010-10-30 00:04:14 GMT Any good tutorials or examples that people could point me to on creating a netcdf file for a grid projected with a stereographic projection? It's not clear to me how you would create the lat / lon dimensions. Thanks, john http://p.sf.net/sfu/nokia-dev2dev

    18. Frequently Asked Questions — SciPy
    Use numpy.loadtxt(). Even if your text file has header and footer lines or comments, loadtxt can almost certainly read it; it is convenient and efficient.
    http://new.scipy.org/faq.html
    Navigation
    Site Navigation
    Where to get help
    Previous topic
    Next topic
    NumPy and SciPy Project Mailing Lists
    Search
    $('#searchbox').show(0);
    Frequently Asked Questions
    • General questions about NumPy
      • What is NumPy? Why should I use NumPy rather than IDL, MATLAB, Octave, or Yorick? What is a NumPy array? ...
        What is NumPy?
        NumPy is a Python extension module that provides efficient operation on arrays of homogeneous data. It allows python to serve as a high-level language for manipulating numerical data, much like IDL, MATLAB, or Yorick.
        Why should I use NumPy rather than IDL, MATLAB, Octave, or Yorick?
        sui generis programming language, and it is relatively easy to connect existing C and Fortran code to the Python interpreter.
        What is a NumPy array?
        A NumPy array is a multidimensional array of objects all of the same type. In memory, it is an object which points to a block of memory, keeps track of the type of data stored in that memory, keeps track of how many dimensions there are and how large each one is, and - importantly - the spacing between elements along each axis. For example, you might have a NumPy array that represents the numbers from zero to nine, stored as 32-bit integers, one right after another, in a single block of memory. (for comparison, each Python integer needs to have some type information stored alongside it). You might also have the array of even numbers from zero to eight, stored in the same block of memory, but with a gap of four bytes (one 32-bit integer) between elements. This is called

    19. Discussion Of Numerical Python
    I find that loadtxt is rather slow. Is this to be expected? Probably. You don't say exactly what you mean by slow , so it's difficult to tell.
    http://blog.gmane.org/gmane.comp.python.numeric.general/month=20090301
    Discussion of Numerical Python headers Bruce Southey 1 Mar 04:26
    Re: Call for testing: full blas/lapack builds of numpy on windows 64 bits
    2009-03-01 03:26:17 GMT
    http://wiki.winehq.org/Wine64
    (Continue reading)
    Permalink
    Reply ... David Cournapeau 1 Mar 09:00
    Re: Call for testing: full blas/lapack builds of numpy on windows 64 bits
    2009-03-01 08:00:07 GMT
    http://wiki.winehq.org/Wine64
    (Continue reading)
    Permalink
    Reply ... Kevin Dunn 1 Mar 16:37
    Help on subclassing numpy.ma: array_ wrap
    2009-03-01 15:37:01 GMT
    Hi everyone,
    I'm subclassing Numpy's MaskedArray to create a data class that handles missing data, but adds some extra info I need to carrry around. However I've been having problems keeping this extra info attached to the subclass instances after performing operations on them. The bare-bones script that I've copied here shows the basic issue: http://pastebin.com/f69b979b8 There are 2 classes: one where I am able to subclass numpy (with help from the great description at http://www.scipy.org/Subclasses ), and the other where I subclass numpy.ma

    20. Scipy Stats Project: May 2009
    All of the functions loadtxt, recfromcsv, recfromtxt, etc. use genfromtxt they just have different default values for the keyword arguments.
    http://scipystats.blogspot.com/2009_05_01_archive.html

    Page 1     1-20 of 97    1  | 2  | 3  | 4  | 5  | Next 20

    free hit counter