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
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
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 - 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
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
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
what is the maximum number ls can list down (6 Replies)
Discussion started by: karnan
6 Replies
7. Shell Programming and Scripting
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
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
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
LEARN ABOUT CENTOS
std::tuple
std ::tuple< _Elements >(3) Library Functions Manual std::tuple< _Elements >(3)
NAME
std::tuple< _Elements > -
SYNOPSIS
Inherits std::_Tuple_impl< 0, _Elements...>.
Public Member Functions
constexpr tuple (const _Elements &...__elements)
template<typename... _UElements, typename = typename
enable_if<__and_<is_convertible<_UElements, _Elements>...>::value>::type> constexpr tuple (_UElements
&&...__elements)
constexpr tuple (const tuple &)=default
constexpr tuple (tuple &&)=default
template<typename... _UElements, typename = typename enable_if<__and_<is_convertible<const
_UElements&, _Elements>...>::value>::type> constexpr tuple (const tuple< _UElements...> &__in)
template<typename... _UElements, typename = typename
enable_if<__and_<is_convertible<_UElements, _Elements>...>::value>::type> constexpr tuple (tuple< _UElements...>
&&__in)
template<typename _Alloc > tuple (allocator_arg_t __tag, const _Alloc &__a)
template<typename _Alloc > tuple (allocator_arg_t __tag, const _Alloc &__a, const _Elements &...__elements)
template<typename _Alloc , typename... _UElements, typename = typename enable_if<sizeof...(_UElements) ==
sizeof...(_Elements)>::type> tuple (allocator_arg_t __tag, const _Alloc &__a, _UElements &&...__elements)
template<typename _Alloc > tuple (allocator_arg_t __tag, const _Alloc &__a, const tuple &__in)
template<typename _Alloc > tuple (allocator_arg_t __tag, const _Alloc &__a, tuple &&__in)
template<typename _Alloc , typename... _UElements, typename = typename enable_if<sizeof...(_UElements) ==
sizeof...(_Elements)>::type> tuple (allocator_arg_t __tag, const _Alloc &__a, const tuple< _UElements...> &__in)
template<typename _Alloc , typename... _UElements, typename = typename enable_if<sizeof...(_UElements) ==
sizeof...(_Elements)>::type> tuple (allocator_arg_t __tag, const _Alloc &__a, tuple< _UElements...> &&__in)
void noexcept (noexcept(__in._M_swap(__in)))
tuple & operator= (const tuple &__in)
tuple & operator= (tuple &&__in) noexcept(is_nothrow_move_assignable< _Inherited >::value)
template<typename... _UElements, typename = typename enable_if<sizeof...(_UElements) == sizeof...(_Elements)>::type> tuple
& operator= (const tuple< _UElements...> &__in)
template<typename... _UElements, typename = typename enable_if<sizeof...(_UElements) == sizeof...(_Elements)>::type> tuple
& operator= (tuple< _UElements...> &&__in)
Detailed Description
template<typename... _Elements>class std::tuple< _Elements >
Primary class template, tuple.
Definition at line 388 of file tuple.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
libstdc++ Tue Jun 10 2014 std::tuple< _Elements >(3)