Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Maximum number of data in Python Post 302938163 by cjcox on Thursday 12th of March 2015 03:57:44 PM
Old 03-12-2015
maybe a Python tuple is a better fit? (for example, an array of tuples)

Code:
tuple_array = [
  (0.00000000e+00, 0.),
  (1.00000000e-02, -0.00596894),
  (2.00000000e-02, -0.01193791)
]
print tuple_array

Produces:

[(0.0, 0.0), (0.01, -0.00596894), (0.02, -0.01193791)]

Continuing on....

Code:
for tuple in tuple_array:
   print tuple

Produces:

(0.0, 0.0)
(0.01, -0.00596894)
(0.02, -0.01193791)


Does that help?

---------- Post updated at 02:57 PM ---------- Previous update was at 02:20 PM ----------

You could also use an array (list) of lists:

Code:
list_array = [ [0.00000000e+00, 0.], [1.00000000e-02, -0.00596894], [2.00000000e-02, -0.01193791] ]

This might be better if you need to manipulate the list elements.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Maximum number of threads per user

Anybody knows how to setup Maximum number of threads per user or some other value on Sun Solaris 8. (1 Reply)
Discussion started by: s_aamir
1 Replies

2. UNIX for Dummies Questions & Answers

Maximum number of users allowed

How do i determen (what command) the max. number of users allowed Thanks in advance (10 Replies)
Discussion started by: siza
10 Replies

3. Programming

maximum number of dots in a domain name

maximum number of dots in a domain name - not a sub-domain name. for example: mydomain.com ------ one dot mydomain.com.au ------ two dots do you know maximum number of dots in a domain name and could you provide a sample? thx. (1 Reply)
Discussion started by: hello20009876
1 Replies

4. Solaris

Maximum Number of threads suuported????

Hi, Anybody knows the maximum number of threads suuported by a process in solaris os. Please reply Thanks in advance :( (1 Reply)
Discussion started by: Agnello
1 Replies

5. UNIX for Dummies Questions & Answers

maximum number of arguments

Hi, What is the maximum number of arguments that could be passed to zsh ? To find out that I tried a simple script. And the maximum number of arguments that could be passed turned out to be 23394 #! /bin/zsh arg=1 i=1 subIndex=23000 while do arg=$arg" "$i i=$(($i + 1))... (9 Replies)
Discussion started by: matrixmadhan
9 Replies

6. UNIX for Dummies Questions & Answers

ls - maximum number of files

what is the maximum number ls can list down (6 Replies)
Discussion started by: karnan
6 Replies

7. Shell Programming and Scripting

Maximum number of characters in a line.

Hi, Could any one please let me know what is the maximum number of characters that will fit into a single line of a flat file on a unix. Thanks. (1 Reply)
Discussion started by: Shivdatta
1 Replies

8. Shell Programming and Scripting

Maximum number from input by user

I am trying to calculate the maximum number from four numbers input by the user. I have the following code, but it does not work. It says there's an error with the last line "done". Any help would be appreciated. max=0 echo "Please enter four numbers: " for i in 1 2 3 4 do read number... (17 Replies)
Discussion started by: itech4814
17 Replies

9. UNIX for Dummies Questions & Answers

Maximum number of sed squeezing

Hi all, What is the maximum number of sed squeezing in one shell?? I've surprised with this message when I squeezed 50 sed in the same shell: 253: Identifier too long - maximum length is 18.This is what I've did in my sed query | sed -e "s/ 0 /Default /" | sed -e "s/ 1 ... (2 Replies)
Discussion started by: leo_ultra_leo
2 Replies
csx_Parse_CISTPL_SPCL(9F)				   Kernel Functions for Drivers 				 csx_Parse_CISTPL_SPCL(9F)

NAME
csx_Parse_CISTPL_SPCL - parse the Special Purpose tuple SYNOPSIS
#include <sys/pccard.h> int32_t csx_Parse_CISTPL_SPCL(client_handle_t ch, tuple_t *tu, cistpl_spcl_t *csp); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). tu Pointer to a tuple_t structure (see tuple(9S)) returned by a call to csx_GetFirstTuple(9F) or csx_GetNextTuple(9F). csp Pointer to a cistpl_spcl_t structure which contains the parsed CISTPL_SPCL tuple information upon return from this function. DESCRIPTION
This function parses the Special Purpose tuple, CISTPL_SPCL, into a form usable by PC Card drivers. The CISTPL_SPCL tuple is identified by an identification field that is assigned by PCMCIA or JEIDA. A sequence field allows a series of CISTPL_SPCL tuples to be used when the data exceeds the size that can be stored in a single tuple; the maximum data area of a series of CISTPL_SPCL tuples is unlimited. Another field gives the number of bytes in the data field in this tuple. STRUCTURE MEMBERS
The structure members of cistpl_date_t are: uint32_t id; /* tuple contents identification */ uint32_t seq; /* data sequence number */ uint32_t bytes; /* number of bytes following */ uchar_t data[CIS_MAX_TUPLE_DATA_LEN]; The fields are defined as follows: id This field contains a PCMCIA or JEIDA assigned value that identifies this series of one or more CISTPL_SPCL tuples. These field values are assigned by contacting either PCMCIA or JEIDA. seq This field contains a data sequence number. CISTPL_SPCL_SEQ_END is the last tuple in sequence. bytes This field contains the number of data bytes in the data[CIS_MAX_TUPLE_DATA_LEN]. data The data component of this tuple. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_HANDLE Client handle is invalid. CS_UNKNOWN_TUPLE Parser does not know how to parse tuple. CS_NO_CARD No PC Card in socket. CS_NO_CIS No Card Information Structure (CIS) on PC Card. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
This function may be called from user or kernel context. SEE ALSO
csx_GetFirstTuple(9F), csx_GetTupleData(9F), csx_RegisterClient(9F), csx_ValidateCIS(9F), tuple(9S) PC Card 95 Standard, PCMCIA/JEIDA SunOS 5.11 20 Dec 1996 csx_Parse_CISTPL_SPCL(9F)
All times are GMT -4. The time now is 01:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy