python - Numpy.savetxt() function -


मेरे पास कई कॉलम वाला एक टेबल है और इसे

  numpy.savetxt 'Test.txt', test, fmt = '% f')   

मैं केवल अंतिम कॉलम को फ्लोट प्रारूप में सहेजना चाहता हूं, अन्य सभी कॉलम पूर्णांक होना चाहिए ... उदाहरण के लिए

  1 1 1 0.5 1 2 2 0.3 । । ।   

मैं अपने savetxt फ़ंक्शन को कैसे बड़ा कर सकता हूँ या कुछ विकल्प का उपयोग कर सकता हूँ? अग्रिम में आपका धन्यवाद!

एफएमटी इस तरह एक सरणी हो सकती है:

 < कोड> numpy.savetxt ('test.txt', test, fmt = ['% d', '% d', '% d', '% f'])    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -