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_GetFirstTuple(9F)					   Kernel Functions for Drivers 				     csx_GetFirstTuple(9F)

NAME
csx_GetFirstTuple, csx_GetNextTuple - return Card Information Structure tuple SYNOPSIS
#include <sys/pccard.h> int32_t csx_GetFirstTuple(client_handle_t ch, tuple_t *tu); int32_t csx_GetNextTuple(client_handle_t ch, tuple_t *tu); INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI) PARAMETERS
ch Client handle returned from csx_RegisterClient(9F). tu Pointer to a tuple_t structure. DESCRIPTION
The functions csx_GetFirstTuple() and csx_GetNextTuple() return the first and next tuple, respectively, of the specified type in the Card Information Structure (CIS) for the specified socket. STRUCTURE MEMBERS
The structure members of tuple_t are: uint32_t Socket; /* socket number */ uint32_t Attributes; /* Attributes */ cisdata_t DesiredTuple; /* tuple to search for or flags */ cisdata_t TupleCode; /* tuple type code */ cisdata_t TupleLink; /* tuple data body size */ The fields are defined as follows: Socket Not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket number. Attributes This field is bit-mapped. The following bits are defined: TUPLE_RETURN_LINK Return link tuples if set. The following are link tuples and will only be returned by this function if the TUPLE_RETURN_LINK bit in the Attributes field is set: CISTPL_NULL CISTPL_LONGLINK_MFC CISTPL_LONGLINK_A CISTPL_LINKTARGET CISTPL_LONGLINK_C CISTPL_NO_LINK CISTPL_LONGLINK_CB CISTPL_END TUPLE_RETURN_IGNORED_TUPLES Return ignored tuples if set. Ignored tuples will be returned by this function if the TUPLE_RETURN_IGNORED_TUPLES bit in the Attributes field is set, see tuple(9S) for more information. The CIS is parsed from the location setup by the previous csx_GetFirstTuple() or csx_GetNextTuple() request. DesiredTuple This field is the tuple value desired. If it is RETURN_FIRST_TUPLE, the very first tuple of the CIS is returned (if it exists). If this field is set to RETURN_NEXT_TUPLE, the very next tuple of the CIS is returned (if it exists). If the DesiredTuple field is any other value on entry, the CIS is searched in an attempt to locate a tuple which matches. TupleCode,TupleLink These fields are the values returned from the tuple found. If there are no tuples on the card, CS_NO_MORE_ITEMS is returned. Since the csx_GetFirstTuple(), csx_GetNextTuple(), and csx_GetTupleData(9F) functions all share the same tuple_t structure, some fields in the tuple_t structure are unused or reserved when calling this function and these fields must not be initialized by the client. RETURN VALUES
CS_SUCCESS Successful operation. CS_BAD_HANDLE Client handle is invalid. CS_NO_CARD No PC Card in socket. CS_NO_CIS No Card Information Structure (CIS) on PC card. CS_NO_MORE_ITEMS Desired tuple not found. CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed. CONTEXT
These functions may be called from user or kernel context. SEE ALSO
csx_GetTupleData(9F), csx_ParseTuple(9F), csx_RegisterClient(9F), csx_ValidateCIS(9F), tuple(9S) PC Card 95Standard, PCMCIA/JEIDA SunOS 5.11 20 Dec 1996 csx_GetFirstTuple(9F)
All times are GMT -4. The time now is 05:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy