- Timestamp:
- 09/26/12 15:39:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/pyfact.py
r14423 r14428 646 646 # or whole arrays of numbers as well. 647 647 # we treat single elements differently... 648 if number_of_elements == 0: 649 return 648 650 if number_of_elements == 1: 649 651 # allocate some memory for a single number according to its type … … 690 692 local = np.zeros( number_of_elements, nptype) 691 693 692 # Set the Pointer Address 693 f.SetPtrAddress(colname, local) 694 # Set the Pointer Address 695 try: 696 f.SetPtrAddress(colname, local) 697 except TypeError: 698 print 'something was wrong with SetPtrAddress()' 699 print 'Type of colname', type(colname) 700 print 'colname:', colname 701 print 'Type of local', type(local) 702 print 'length of local', len(local) 703 print 'local should be alle zeros, since "local = np.zeros( number_of_elements, nptype)" ' 704 raise 705 694 706 self._table_cols[colname] = local 695 707 if number_of_elements > 1:
Note:
See TracChangeset
for help on using the changeset viewer.